New answers tagged

0 votes

How to list security groups for the specific instance via CLI?

If you want to run this on an EC2 instance and find out its own security groups, you can do: id=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) for sg in $(aws ec2 describe-...
  • 101

Top 50 recent answers are included