Instance Metadata and User Data#

Instance metadata is data about your instance that you can use to configure or manage the running instance. There are several types of instance metadata.

EC2 instances can also include dynamic data, such as an instance identity document that is generated when the instance is launched.

You can also access the user data that you supplied when launching your instance. For example, you can specify parameters for configuring your instance, or attach a simple script.

If you launch more than one instance at the same time, the user data is available to all instances in that reservation (i.e. for the request RunInstances).

You can only access instance metadata and user data from within the instance itself, so the data is not protected by cryptographic methods. Anyone who can access the instance can view its metadata. Therefore, you should take appropriate precautions to protect sensitive data (such as long-term encryption keys). You should not store sensitive data, such as passwords and user data.