Last active
December 3, 2024 20:26
-
-
Save criscunhasantos/da9d3a6f19fd237ec87a5a6f1b3ce9e6 to your computer and use it in GitHub Desktop.
AWS Cheat Sheet
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
aws ec2 describe-vpn-connections --query 'VpnConnections[*].{Nome:Tags[?Key==`Name`]|[0].Value,Rotas:Routes[*].DestinationCidrBlock}' --output yaml |
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
aws ec2 describe-volumes --query "Volumes[*].{VolumeID:Attachments[0].VolumeId,InstanceID:Attachments[0].InstanceId,State:Attachments[0].State,Encrypted:Encrypted}" |
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
ssh-keygen -f ./livecloud -t rsa -m PEM |
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
aws ec2 revoke-security-group-ingress --group-id $groupId ` | |
--ip-permissions ` | |
"$(aws ec2 describe-security-groups --output json --group-ids $groupId --query "SecurityGroups[0].IpPermissions")" |
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
aws ec2 describe-instances --query "Reservations[*].Instances[*].{PublicIP:PublicIpAddress,PrivateIP:PrivateIpAddress,Name:Tags[?Key=='Name'].Value|[0],Status:State.Name,VpcId:VpcId,InstanceID:InstanceId,Groups:join(',',NetworkInterfaces[].Groups[].GroupId),IamInstanceProfile:IamInstanceProfile.Arn}" --filters "Name=instance-state-name,Values=running" --output json | |
aws ec2 describe-instances --query "Reservations[*].Instances[*].{PrivateIP:PrivateIpAddress,Name:Tags[?Key=='Name'].Value|[0],Status:State.Name,IamInstanceProfile:IamInstanceProfile.Arn}" --filters "Name=instance-state-name,Values=running" --output table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment