-1

please tell me the step by step approach.

syam reddy
  • 11
  • 1

1 Answers1

1

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

All you need is here. For simple, you can use this command to get AMI ID or Security Groups:

curl http://169.254.169.254/latest/meta-data/ami-id curl http://169.254.169.254/latest/meta-data/security-groups

If you want to put it in the file, just put the > at the end of command:

curl http://169.254.169.254/latest/meta-data/security-groups > test.txt

Chuong Nguyen
  • 1,077
  • 6
  • 15