0
0
AWScloud~5 mins

Instance metadata and user data in AWS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Ahttp://169.254.169.254/latest/meta-data/
Bhttp://aws.amazon.com/metadata
Chttp://instance-data.aws/
Dhttp://localhost/metadata
What happens to user data scripts after the first boot of an EC2 instance?
AThey run every time the instance restarts
BThey run only when manually triggered
CThey never run automatically
DThey run automatically only on the first boot
Which of the following is NOT part of instance metadata?
AUser data script
BPublic IP address
CSecurity groups
DInstance ID
Why should you restrict access to instance metadata service?
ATo reduce AWS costs
BTo speed up instance boot time
CTo prevent unauthorized access to sensitive data like IAM credentials
DTo allow multiple users to share metadata
How can you provide user data to an EC2 instance?
ABy editing the instance metadata URL
BDuring instance launch via the AWS console or CLI
CBy logging into the instance and creating a file
DBy attaching an EBS volume
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.