ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 177 - DVA-C02 discussion

Report
Export

A developer deployed an application to an Amazon EC2 instance The application needs to know the public IPv4 address of the instance

How can the application find this information?

A.
Query the instance metadata from http://169.254.169.254. latestmeta-data/.
Answers
A.
Query the instance metadata from http://169.254.169.254. latestmeta-data/.
B.
Query the instance user data from http '169 254.169 254. latest/user-data/
Answers
B.
Query the instance user data from http '169 254.169 254. latest/user-data/
C.
Query the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/.
Answers
C.
Query the Amazon Machine Image (AMI) information from http://169.254.169.254/latest/meta-data/ami/.
D.
Check the hosts file of the operating system
Answers
D.
Check the hosts file of the operating system
Suggested answer: A

Explanation:

Instance Metadata Service:EC2 instances have access to an internal metadata service. It provides instance-specific information like instance ID, security groups, and public IP address.

Accessing Metadata:

Make an HTTP GET request to the base URL:http://169.254.169.254/latest/meta-data/

You'll get a list of available categories. The public IPv4 address is underpublic-ipv4.

Instance Metadata and User Data:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

asked 16/09/2024
Mark Lalangan
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first