https://thehftguy.com/2016/03/10/how-to-export-amazon-ec2-instances-to-a-csv-file/
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Filtering.html
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
https://docs.aws.amazon.com/cloudshell/latest/userguide/working-with-cloudshell.html
AWS Cloud Shell
aws ec2 describe-instances --filters "Name=tag:Environment,Values=QA" --output json
aws ec2 describe-instances --filters "Name=tag:Environment,Values=QA" --output table > QA_EC2_Instances.tsv
InstanceId
InstanceType
PrivateIpAddress
aws ec2 describe-instances \
--filters "Name=tag:Environment,Values=QA" \
--query 'Reservations[*].Instances[*].{InstanceId:InstanceId,InstanceType:InstanceType,PrivateIpAddress:PrivateIpAddress}' \
--output json \
> QA_EC2_Instances.json
aws ec2 describe-instances --filters Name=instance-state-name,Values=running --query "Reservations[*].Instances[*].InstanceId" --output text
aws iam list-access-keys --user-name john_doe
aws iam list-access-keys --user-name john_doe
No comments:
Post a Comment