aws-samples/ecs-refarch-cloudformation

Migrate to Amazon Linux 2 AMI

rania-chantz opened this issue ยท 12 comments

The use of the recommended ECS-Optimized AMIs is great, let's migrate it though to use the Amazon Linux 2 ones.

What problem would migrating to Amazon Linux 2 solve for you?

None actually. But according to this https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html

If you are migrating from another Linux distribution to Amazon Linux, we recommend that you migrate to Amazon Linux 2. If you are currently using the Amazon Linux AMI, we recommend that you migrate to Amazon Linux 2.

There isn't support for sysvinit in Linux 2 so some of the LaunchConfiguration in ecs-cluster.yaml isn't supported if you switch to a Linux 2 AMI.

I would also like to see this updated. I'd be happy to help and thought that by changing to the ECS-optimised Amazon Linux 2 AMIs that I'd at least get some useful error messages from this architecture to start debugging from, but the instances don't start at all and show no logs anywhere.

This will need updating at some point. From Amazon ECS Developer Guide

Amazon ECS-optimized Amazon Linux AMI โ€“ This AMI is based off of Amazon Linux 1. We recommend that you migrate your workloads to the Amazon ECS-optimized Amazon Linux 2 AMI. Support for the Amazon ECS-optimized Amazon Linux AMI ends no later than June 30, 2020.

But no rush ๐Ÿ˜

Are there any plans to update this? I would like to use Amazon Linux 2 in a CloudFormation stack that I have adapted from this reference architecture. Has anyone successfully updated?

bump

I hate to pile on, but if the Amazon Linux AMI really won't be supported soon, then we really need the reference architecture to document how to use Amazon Linux 2 well before then.

bump ;)

pgiu commented

How should we change the script to use Amazon Linux 2?

I'm also wondering about this.

I have started using CDK instead of using CloudFormation directly. This CDK reference project uses Amazon Linux 2: https://github.com/aws-samples/aws-cdk-examples/blob/master/python/ecs/cluster/app.py#L22, hopefully this can be useful for anyone who needs to switch to Amazon Linux 2.