Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ECS Optimized AMI IDs from script
- Adds a script in bin to generate this list by making DescribeImages call to each Region.
- Loading branch information
Showing
2 changed files
with
37 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters