How can I find out the instance id
of an ec2 instance from within the ec2 instance?
相关问题
- How to generate 12 digit unique number in redshift
- Use awslogs with kubernetes 'natively'
- JQ: Select when attribute value exists in a bash a
- Assume/switch role in aws toolkit for eclipse 2.0
- 'no SavedModel bundles found!' on tensorfl
相关文章
- Right way to deploy Rails + Puma + Postgres app to
- how many objects are returned by aws s3api list-ob
- AWS S3 in rails - how to set the s3_signature_vers
- Passthrough input to output in AWS Step Functions
- I cannot locate production log files on Elastic Be
- ImportError: cannot import name 'joblib' f
- Static IP for Auto Scale in AWS
- Step function exceeding the maximum number of char
In Go you can use the goamz package.
Here's the GetMetaData source.
See this post - note that the IP address in the URL given is constant (which confused me at first), but the data returned is specific to your instance.
You can try this:
Just Type:
For Ruby:
A c# .net class I wrote for EC2 metadata from the http api. I will build it up with functionality as needed. You can run with it if you like it.