Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cloudformation Template, replace EC2 Launch Config with Launch Template #21

Merged

Conversation

jj22ee
Copy link

@jj22ee jj22ee commented Oct 11, 2024

Issue #, if available:
AWS::AutoScaling::LaunchConfiguration is deprecated in favor of AWS::EC2::LaunchTemplate
See also: https://docs.aws.amazon.com/autoscaling/ec2/userguide/migrate-to-launch-templates.html

Description of changes:
Replace AWS::AutoScaling::LaunchConfiguration with AWS::EC2::LaunchTemplate

Testing:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jj22ee jj22ee force-pushed the xray-gettingstarted branch from 2a51512 to 96f7f74 Compare October 11, 2024 20:09
@jj22ee jj22ee force-pushed the xray-gettingstarted branch from 96f7f74 to 359e680 Compare October 11, 2024 20:52
@mwunderl mwunderl self-assigned this Oct 15, 2024
@mwunderl
Copy link
Contributor

I was able to create the stack and use the application.
Stack deletion failed after trying to delete the AWS::ECS::Service resource which timed out after 30 minutes.
Have you been able to delete?

@jj22ee
Copy link
Author

jj22ee commented Oct 15, 2024

Stack deletion failed after trying to delete the AWS::ECS::Service resource which timed out after 30 minutes.
Have you been able to delete?

To fix this:

  1. In ECS console, go to Amazon Elastic Container Service > Clusters > scorekeep-cluster > Infrastructure
  2. Select the instance, and select the deregister button.
  3. Retry delete Cloudformation Stack

This is an existing issue (before sample app broke) where Cloudformation (or CDK) cannot delete an ECS service due to the instance not being drained.

We need to update AWS docs to ask customers to manually drain or deregister their ECS ec2 instance first before deleting the stack.

@mwunderl
Copy link
Contributor

OK not a great experience for your customers trying to figure that out. Suggest following this example and using a Lambda function to clean up the compute resources.
aws/aws-cdk#14732 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants