How to get the instance id from within an ec2 instanAce?

0 votes
How can I find the instance id of an ec2 instance from within the ec2 instance?
Mar 12, 2019 in AWS by Shalil
434 views

1 answer to this question.

0 votes

On Amazon Linux AMIs you can do:

$ ec2-metadata -i
instance-id: i-1234567890abcdef0

answered Mar 12, 2019 by trisha

Related Questions In AWS

0 votes
2 answers

How can I find out the instance id of an ec2 instance from within the ec2 instance?

A curl or wget to http://169.254.169.254/latest/meta-data/instance-id will ...READ MORE

answered Mar 9 in AWS by anonymous
640 views
0 votes
1 answer

How to find instance id from within an Instance?

For Amazon Linux AMIs you can use: $ ...READ MORE

answered Mar 26, 2019 in AWS by Esha
168 views
0 votes
1 answer
0 votes
1 answer

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Using AWS Management Console: Right-Click on the instance Instance ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 57,640 points
145 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Find region from within an EC2 instance

There is one more way of achieving ...READ MORE

answered Mar 12, 2019 in AWS by trisha
523 views
0 votes
1 answer