Does `pulumi.awsx.autoscaling.AutoScalingGroup` on...
# general
only support ECS? If so, why? Seems like it could support instances that don't use the ECS AMI.
if i recall from having used it the other day, it supported everything that
aws application-autoscaling
supports. (which may not be the autoscaling you're looking for)
but I only used it for fargate, so my actual depth was limited.
Not sure what aws-application-autoscaling supports. I cannot see a property on
that would allow me to pass in an arbitrary ami id. It only has
Copy code
*      Application Auto Scaling can scale the following resources:

       o Amazon ECS services. For more information, see Service  Auto  Scaling
         in the Amazon Elastic Container Service Developer Guide .

       o Amazon  EC2  Spot fleets. For more information, see Automatic Scaling
         for Spot Fleet in the Amazon EC2 User Guide .

       o Amazon EMR clusters. For more information, see Using Automatic  Scal-
         ing in Amazon EMR in the Amazon EMR Management Guide .
         for Spot Fleet in the Amazon EC2 User Guide .

       o Amazon EMR clusters. For more information, see Using Automatic  Scal-
         ing in Amazon EMR in the Amazon EMR Management Guide .

       o AppStream  2.0  fleets.  For more information, see Fleet Auto Scaling
         for Amazon AppStream 2.0 in the Amazon AppStream 2.0 Developer  Guide

       o Provisioned  read  and  write capacity for Amazon DynamoDB tables and
         global secondary indexes. For more information, see Managing Through-
         put  Capacity  Automatically with DynamoDB Auto Scaling in the Amazon
         DynamoDB Developer Guide .

       o Amazon Aurora Replicas. For more information, see Using Amazon Aurora
         Auto Scaling with Aurora Replicas .

       o Amazon   SageMaker  endpoint  variants.  For  more  information,  see
         Automatically Scaling Amazon SageMaker Models .

       o Custom resources provided by your own applications or services.  More
         information is available in our GitHub repository .
% aws application-autoscaling help
Yeah that doesn't say anything about plain old ec2 instances.
ec2 autoscaling looks like definitely a different thing
Ya. Gotta love the aws naming scheme šŸ™‚
is probably the one your looking for, doesnt look like awsx provides any wrappers over it
Right. Fairly similar, just doesn't have the ability to pass actual objects in (i.e. `Role`s)
This is a limitation of the current design - but it should definitely be expanded to support more general ASG usage. Opened Note that there are two AWS features here which are actually pretty different: ā€¢
- which is EC2 autoscaling groups ā€¢
- which defines generic autoscaling for a variety of others AWS services - including ECS Services The latter has no abstractions in
yet - but can be used on top of existing
abstractions easily to autoscale an ECS service for example.
is intended to support creating autoscaling groups of EC2 instances, either as backing clusters for something like ECS or EKS, or as pools of raw EC2 servers for delivering applications directly. cc @lemon-spoon-91807
@full-dress-10026 Any interest in contributing changes here?
Note: as a very simple change, i could make it work right now such that
can be provided the launch-config-id for any launch config you want to make.
that's all we really need to pass along. that would at least make it possible for you to create whateer you want and let us know about it to make the asg.
@full-dress-10026 would be curious for you to try out
and to see if it was sufficient for your needs
and, if not, what else would need to be exposed.
we can then roll that info into future improvements here (and in app-autoscaling once we get around to that)
i've never tried using these other sorts of auto scaling areas, so i would def benefit from feedback from someone directly in that space.
i can publish this to a feature branch
This is a low priority experiment so I don't think I'll have the time to implement this myself. I got it working using the pulumi-aws package. It was just confusing that the awsx auto scaling group couldn't do something like this but was similar enough that it seemed like it should work. I gave up trying to get an autoscaling group to work with a launch template because you always get this obtuse error:
Copy code
Plan apply failed: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. The requested configuration is currently not supported. Please check the documentation for supported configurations.
Using a launch configuration seemed to work. Passing the launch template to the awsx asg would let us at least use the awsx asg component. Though, not sure how that would be much different than just using pulumi-aws asg component.
If you can link to your code, that will be great
Luke and I talked. We can easily fix up ASG to be non ecs opinionated. It will still be ec2 opinionated. Future work can cover app-asg
@white-balloon-205 I was wrong about the userData section. We just do the cfn-signal stuff. but that looks ec2 specific, not ecs. so it's likely fine to keep in.
Ok, have a potential real fix here:
going to be in a feature branch. I'll ping you @full-dress-10026 about trying it out if you're willing.
basically, this will be published to npm under a special version
You can then just refer to that version and try things out! šŸ™‚
but, for now, weekend time.
Sure, happy to try it out.