Skip to content

Instantly share code, notes, and snippets.

@NearlyUnique
Created December 22, 2016 11:28
Show Gist options
  • Save NearlyUnique/8569838514f2c83de7150578a1ea9ecf to your computer and use it in GitHub Desktop.
Save NearlyUnique/8569838514f2c83de7150578a1ea9ecf to your computer and use it in GitHub Desktop.
@rem List aws instaces in all regions
@echo off
for /F "tokens=*" %%a in ('aws ec2 describe-regions --profile=%1^|jq .Regions[].RegionName -r') do (
echo # Region:%%a
aws ec2 describe-instances --region=%%a --profile=%1 | jq ".Reservations[].Instances[]|.InstanceId+\" \"+.State.Name" -r
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment