Skip to content

Commit

Permalink
Update ECS Optimized AMI IDs from script
Browse files Browse the repository at this point in the history
- Adds a script in bin to generate this list by making DescribeImages
  call to each Region.
  • Loading branch information
jpignata committed Jan 19, 2018
1 parent b283183 commit b49d9d8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
13 changes: 13 additions & 0 deletions bin/get_amis.sh
@@ -0,0 +1,13 @@
echo "AWSRegionToAMI:"

for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text)
do
echo " ${region}:"
echo -n " AMI: "

aws ec2 describe-images \
--owners amazon \
--query 'reverse(sort_by(Images[?Name != `null`] | [?contains(Name, `amazon-ecs-optimized`) == `true`], &CreationDate))[:1].ImageId' \
--output text \
--region $region
done
44 changes: 24 additions & 20 deletions templates/ecs-cluster.yaml
Expand Up @@ -34,32 +34,36 @@ Conditions:

Mappings:
AWSRegionToAMI:
us-east-2:
AMI: ami-901338f5
us-east-1:
AMI: ami-13401669
us-west-2:
AMI: ami-9a02a9e2
us-west-1:
AMI: ami-b3adacd3
ap-south-1:
AMI: ami-00491f6f
eu-west-3:
AMI: ami-bd10a7c0
AMI: ami-9aef59e7
eu-west-2:
AMI: ami-acd5cdc8
AMI: ami-67cbd003
eu-west-1:
AMI: ami-7827b301
eu-central-1:
AMI: ami-b378e8dc
AMI: ami-1d46df64
ap-northeast-2:
AMI: ami-d6f454b8
AMI: ami-c212b2ac
ap-northeast-1:
AMI: ami-af46dbc9
ap-southeast-2:
AMI: ami-b88e7cda
ap-southeast-1:
AMI: ami-fec3b482
AMI: ami-872c4ae1
sa-east-1:
AMI: ami-af521fc3
ca-central-1:
AMI: ami-e8cb4e8c
AMI: ami-435bde27
ap-southeast-1:
AMI: ami-910d72ed
ap-southeast-2:
AMI: ami-58bb443a
eu-central-1:
AMI: ami-509a053f
us-east-1:
AMI: ami-28456852
us-east-2:
AMI: ami-ce1c36ab
us-west-1:
AMI: ami-74262414
us-west-2:
AMI: ami-decc7fa6


Resources:
Expand Down

0 comments on commit b49d9d8

Please sign in to comment.