Instance metadata and userdata
- Instance metadata is data about your instance
- Instance metadata is divided into categories
- host name
- events
- security groups
- Instance metadata from running instance can be accessed using
- Instance metadata Service Version 1 (IMDSv1) – a request/response method
- Instance metadata Service Version 2 (IMDSv2) – a session-oriented method.
- By default both versions work, but you can configure instance metadata option
- To retrieve metadata from running instance use the following URI
http://169.254.169.254/latest/meta-data/
- Refer Here
- User data: is set of commands/data you can provide at instance launch time
- User data can be entered during launch of ec2 instance
- Retrieving user data using instance metadata:
- modifying user data
- In user data you can also specify cloud-init
AWS System Status checks
- Types of Status checks
- System Status Checks: Checks the AWS system on which instance runs. The physical server on which aws ec2 instance might have some failures such as
- loss of network connectivity
- Loss of power
- Software/Hardware issues on physical server/host
- Instance Status Checks: Check the software & network configuration of your individual instance. EC2 sends ARP (Address resolution protocol) to the network interface (NIC).
- The following are problems that can cause instance checks to fail
- System status fails
- Exhausted memory
- Corrupted filesystem
- Incompatible kernel
- Incorrect networking or startup configuration.
- System Status Checks: Checks the AWS system on which instance runs. The physical server on which aws ec2 instance might have some failures such as