Practice Test 4 | AWS Certified Cloud Practitioner | CLF-C01 | Dumps | Mock Test
I need to check whether my EC2 instances are running properly. I have written a script that will help me obtain the instance’s ID and then send a notification to an SNS topic. How can I obtain the instance’s ID?
A. By querying the instance’s Meta Data
B. By querying the instances User Data
C. I need to get authorized with an IAM role prior to accessing the instance’s ID using Metadata
D. I cannot use a script. I need to login to the AWS console & manually check the instance’s ID & its status
Correct Answer: A
- Option A is CORRECT. An instance’s Meta data provides me with information about the instance like Instance ID, Local IP, Instance Type etc..I can query the instances Meta data using an internal IP http://169.254.169.254/latest/meta-data/ which can be accessed only from within an EC2 instance
- Option B is incorrect. User Data is a section used for providing startup configuration to an EC2 instance. Eg if I need to have an Apache web server running on an EC2 instance after it is provisioned, I can use the User Data section & provide scripts for installing the software during instance creation
- Option C is incorrect. Meta data information is available to EC2 instances by default without the need to provide an IAM role for accessing it
- Option D is incorrect. Console login or manual intervention is not required to achieve this task. I can write a script & configure it to run at a scheduled time of the day wherein the EC2 instance can express itself to provide its health status.
References:
Comments are closed, but trackbacks and pingbacks are open.