Recall & Review
beginner
What is instance metadata in AWS EC2?
Instance metadata is data about your EC2 instance that you can access from within the instance. It includes information like instance ID, public IP, and security groups.
Click to reveal answer
beginner
How do you access instance metadata from an EC2 instance?
You access instance metadata by making an HTTP GET request to the special URL http://169.254.169.254/latest/meta-data/ from inside the instance.
Click to reveal answer
beginner
What is user data in AWS EC2 instances?
User data is a script or commands you provide when launching an EC2 instance. It runs automatically on the first boot to configure the instance.
Click to reveal answer
intermediate
Can instance metadata be modified by the user?
No, instance metadata is read-only and provided by AWS. You cannot change it from inside the instance.
Click to reveal answer
intermediate
Why is it important to secure access to instance metadata?
Because instance metadata can contain sensitive information like IAM role credentials, unauthorized access can lead to security risks.
Click to reveal answer
Where do you retrieve EC2 instance metadata from inside the instance?
✗ Incorrect
Instance metadata is accessed via the special IP 169.254.169.254 inside the instance.
What happens to user data scripts after the first boot of an EC2 instance?
✗ Incorrect
User data scripts run automatically only during the first boot of the instance.
Which of the following is NOT part of instance metadata?
✗ Incorrect
User data is separate from instance metadata; it is a script provided at launch.
Why should you restrict access to instance metadata service?
✗ Incorrect
Instance metadata can contain sensitive info, so restricting access improves security.
How can you provide user data to an EC2 instance?
✗ Incorrect
User data is provided at launch time through the AWS console, CLI, or API.
Explain what instance metadata is and how it can be accessed inside an EC2 instance.
Think about the special IP address used inside the instance.
You got /3 concepts.
Describe the purpose of user data in EC2 instances and when it runs.
Consider how you automate setup when launching a new server.
You got /3 concepts.