Open darin-holloway opened 1 year ago
Altering the EB auto scaling to use LaunchTemplates instead of LaunchConfiguration is a PITA.
So far the only viable workaround is to switch EB to use something that needs LaunchTemplates. Example workaround I used for a multi-instance environment:
Fleet composition
to use Combine purchase options and instances
Fleet composition
back to On-Demand instances
Other alternatives I tried:
So good news is, we do have something in our cloudformation templates that does force launch template usage around spot, so my list of affected stacks is confined to production only, but our leadership refuses to approve spot for production workloads at this time, so I'll need to bake something else into the templates to force it in all environments.
I did the same thing as maketz a few days ago, worked for me. Just a note that you don't need to stay on spot instances to effect the change, or even practically deploy spot instances. I set the 'On-demand base' to a value that ensured that no spot instances were even deployed.
Once you've applied the change, as above, just roll it back to using the On-demand instances - under the hood, the environment will have switched to LaunchTemplates, and it will stay that way.
It's a painful way of making the change, but it does work and doesn't require you to stay with spot instances.
@darin-holloway Can you share the update from support here?
As a gist, " aws:autoscaling:launchconfiguration" namespace is valid for EC2 resources created with both Amazon EC2 launch template or an Auto Scaling group launch configuration. Customers can continue to use this namespace to modify the EC2KeyName, InstanceProfile, IMDS settings etc. for environments using launch templates as well.
You can leverage the use of the above namespace for modifying IamInstanceProfile, EC2KeyName, InstanceType via launch templates as well.
Moreover, as the namespace aws:autoscaling:launchconfiguration is valid for resources created by both Amazon EC2 launch template or an Auto Scaling group launch configuration.
We had done a fairly extensive migration to gp3 storage already that had accounted for most stacks and I'm rolling the last batches of stacks that we care about for future compatibility tomorrow morning 2022-12-06
Everyone, the most straightforward way to switch to Launch Templates is to explicitly disable IMDSv1:
Maybe that will help someone...
Disabling IMDSv1 is not enough (in some cases) when creating a new environment with an existing account.
"Creating Auto Scaling launch configuration failed Reason: Resource handler returned message: 'The Launch Configuration creation operation is not available in your account. Use launch templates to create configuration templates for your Auto Scaling groups. (Service: AutoScaling, Status Code: 400, Request ID: YYY)' (RequestToken: XXX, HandlerErrorCode: GeneralServiceException)"
But setting both :
Then, after creation, you can revert RootVolumeType to Default.
Community Note
Tell us about your request What do you want us to build?
We received a notification from support that we we had active launch configurations on our account and they are in the process of deprecating them in favor of launch templates
https://aws.amazon.com/blogs/compute/amazon-ec2-auto-scaling-will-no-longer-add-support-for-new-ec2-features-to-launch-configurations/
Is this request specific to an Elastic Beanstalk platform? If so, which one(s)?
No, this is not platform specific.
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.
After reviewing https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html
Namespace: aws:autoscaling:launchconfiguration
Option Names: IamInstanceProfile, EC2KeyName, InstanceType are the impacted items
Are you currently working around this issue? How are you currently solving this problem?
Unknown, will be filing a support case for guidance as well
Additional context Anything else we should know?
Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)