hi there! Is there an example project that shows h...
# getting-started
n
hi there! Is there an example project that shows how to set up AWS Autoscaling for ECS Service on pulumi? Preferably with Typescript, but any other language also works.
m
There is documentation using the
@pulumi/awsx
module, also know as Pulumi Crosswalk for AWS. See: https://www.pulumi.com/docs/guides/crosswalk/aws/autoscaling/
n
thanks for the links Steffen! From what I see, the first link shows how to autoscale a cluster when it's used with EC2 instances. I'm curious on autoscaling an ECS Service (min/max size based on autoscaling policies, for example: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-configure-auto-scaling.html) that runs on Fargate.
m
The first shows scaling ec2 either running instances or running ECS cluster. The second link is on the Elastic Container Service. awsx is pulumi components, that wrap aws for setting up best practice infrastructure. If you need to handle it yourself, you might find inspiration in the pulumi-awsx repository.
n
sorry Steffen, but I still don't see any hint on what I'm looking for. For example, see the following screenshot from AWS UI. It's possible to set up autoscaling policy per ECS Service. Is that possible to achieve with pulumi?
note that, no EC2 autoscaling is involved here.
m
https://github.com/pulumi/pulumi-awsx/issues/689#issuecomment-1202563087 This comment suggests using
new aws.appautoscaling.Target
n
nice! Thanks a lot 🙏