Search code examples
amazon-web-servicesaws-cloud9

AWS Cloud9 EC2 - Curl for meta data not returning anything


I'm total beginner trying to learn AWS via an online course.

In AWS console I have created a Cloud9 environment and in Cloud9 terminal I try to get a list meta-data with curl but I get no result.

User:~/environment $ curl -s http://169.254.169.254/latest/meta-data
User:~/environment $ 

I was hoping to get a list of meta-data but there is no result.

Does anyone have any suggestion what I have done wrong?


Solution

  • It sounds like the instance has been launched using Instance Metadata Service v2 - Amazon Elastic Compute Cloud. This has a more complicated calling method.

    If you change it back to v1 it should work as expected.

    From Modify instance metadata options for existing instances - Amazon Elastic Compute Cloud:

    • Select the instance
    • Choose Actions, Instance settings, Modify instance metadata options.