Created
January 18, 2024 18:52
-
-
Save thibault-ketterer/7bda669cd1c2e15681784f5bd23bad3c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# list ec2 instances everywhere, with creation date and tag, | |
# output is not really nice beacuse of tags, but it works | |
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do | |
echo "Region: $region" | |
aws ec2 describe-instances --region $region --query 'Reservations[].Instances[].[InstanceId, InstanceType, LaunchTime, State.Name, Tags]' --output text | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment