Skip to content

Instantly share code, notes, and snippets.

@osule
Last active February 11, 2020 11:08
Show Gist options
  • Save osule/3a4391f99ded6eabb5fb80af153eac49 to your computer and use it in GitHub Desktop.
Save osule/3a4391f99ded6eabb5fb80af153eac49 to your computer and use it in GitHub Desktop.
Older Amazon Linux AMI

Amazon announced EOL for Amazon Linux AMI.

https://aws.amazon.com/de/amazon-linux-ami/

It's important to do an audit of all instance reservations in your platform and migrate away from these images before the announce date.

The steps below should provide a list of instance reservations still using Amazon Linux AMI

Identify Amazon Linux AMI

https://docs.aws.amazon.com/AWSEC2/lastest/UserGuide/amazon-linux-ami-basics.html

aws ec2 describe-images \
--owners=amazon \
--filters "Name=name,Values=*amzn-ami-hvm*" \
--query "[{Name:'image-id',Values:Images[*].ImageId}]" \
--region=eu-central-1 
--output=json
> amis_filter.json

Get all EC2 reservations using Amazon Linux AMI

aws ec2 describe-instances --filter file://amis_ids.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment