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

Launch Templates vs Launch Configurations #1153

Open
NevRA opened this issue Nov 30, 2022 · 3 comments
Open

Launch Templates vs Launch Configurations #1153

NevRA opened this issue Nov 30, 2022 · 3 comments

Comments

@NevRA
Copy link

NevRA commented Nov 30, 2022

Summary

I received a message from AWS
We have identified that one or more of your accounts uses Amazon EC2 Auto Scaling launch configurations. After December 31, 2022 no new Amazon Elastic Compute Cloud (Amazon EC2) instance types will be added to launch configurations. After this date, existing launch configurations will continue to work, but new EC2 instances will only be supported through launch templates. In 2021, through email notifications, console banners, documentation updates, re:Post banners, and a blog post [1], AWS announced that Amazon EC2 Auto Scaling would stop adding new EC2 instance types to launch configurations [2] by the end of 2022. Launch templates [3] exceed launch configurations in functionality. In addition to supporting all new EC2 instance types, launch templates provides a simple way to combine multiple instance types and purchase options, configure instance networking settings, use these settings with other AWS services, and maintain versions of these settings. You can convert your launch configurations to launch templates using the AWS Management Console

Is it possible to configure Launch Templates using AWS ECS cli?

Description

I'm using below commands:

ecs-cli configure profile --access-key $AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY --profile-name $ECS_PROFILE

ecs-cli configure --cluster $ECS_CLUSTER --default-launch-type EC2 --config-name $ECS_CLUSTER_CONFIG --region $AWS_REGION

ecs-cli up --keypair pair-key --capability-iam --size 1 --instance-type t2.xlarge --cluster-config $ECS_CLUSTER_CONFIG --ecs-profile $ECS_PROFILE

ecs-cli compose create --create-log-groups --cluster-config $ECS_CLUSTER_CONFIG --ecs-profile $ECS_PROFILE

Expected Behavior

To create Launch Templates instead of Launch Configurations

Observed Behavior

Deprecated Launch Configuration created

@diablodale
Copy link
Contributor

Hi. My understanding is this tool and repo are deprecated. I doubt we will see AWS make an official code update.
Still, there is some good news...

When one follows these conditions:

  • continue to use the same AWS account to create/destroy clusters using ECS-CLI
  • AND
  • don't need the newest ECS instance types

...then I think the tool will continue to work with no changes. The official blog post on this, sdk docs, and yesterday's email you received all suggest this to me. Definitely check independent for your own projects.

Next, a quick look at the code shows the embedded CloudFormation template

uses launch configurations. It is technically possible to update this and the other parts of ECS-CLI code to use the newer launch template. If someone knew the ECS-CLI codebase well, I suspect it is less than a week's work.

@NevRA
Copy link
Author

NevRA commented Dec 1, 2022

@diablodale, thanks for the reply.
I'm using it because I need EC2 & docker compose support (AWS Copilot CLI doesn't support it yet). Maybe you know an alternative to ECS CLI?

@diablodale
Copy link
Contributor

diablodale commented Dec 1, 2022

Docker themselves added an ability to push to ECS using their native docker-compose. Perhaps that has enough features to meet your needs.

https://www.docker.com/blog/docker-compose-from-local-to-amazon-ecs/
https://docs.docker.com/cloud/ecs-integration/
https://aws.amazon.com/blogs/containers/deploy-applications-on-amazon-ecs-using-docker-compose/

or 3rd party https://github.com/compose-x/ecs_composex/

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

No branches or pull requests

2 participants