| Did this page help you? Yes No Tell us about it... |
How do I handle time synchronization between instances?
You can set up NTP (Network Time Protocol). For more information, go to www.ntp.org. NTP is particularly important if you plan on using any AWS products (such as Amazon S3 or Amazon EC2) from within an instance, because requests to these services must be timestamped.
Is there a method for an instance to discover its own instance ID?
From within your instance you can use REST-like queries to http://169.254.169.254/latest/ to retrieve various instance-specific metadata, including the instance ID. For more information, see Using Instance Metadata.
Can I pass arbitrary configuration values to an instance at launch time?
Yes, although the size of the data is limited to 16K. For more information, see User Data Retrieval.
Is there a way to run a script on instance termination?
Amazon EC2 tries to shut an instance down cleanly (running system shutdown scripts), but there is only a short time available. In some cases (e.g., hardware failure), this does not happen.
Because there is no way to ensure shutdown scripts run, have a strategy to deal with abnormal terminations.
How can I allow other people to launch my AMIs?
You can allow other AWS accounts to launch your AMIs by modifying the AMI's
launchPermission attribute. You can grant public launch permissions or explicit
permissions to specific AWS accounts. For more information, see Sharing AMIs Safely.
Why do I need to reregister a rebundled Amazon EC2 instance store-backed AMI? Can I keep the same AMI ID?
An AMI ID is associated with the physical bits in an image. To protect users from images being modified, we require you to reregister Amazon EC2 instance store-backed AMIs after rebundling.
How can I push an Amazon S3 object to an Amazon EBS volume?
You can push an Amazon S3 object to an Amazon EBS volume by mounting the Amazon EBS volume on an Amazon EC2 instance and then using a data transfer application (e.g., FTP/SFTP, SCP) on your running instance to transfer the data.
Can I pass JVM properties to the command line tools?
Yes. By setting the environment variable EC2_JVM_ARGS, you can pass arbitrary
JVM properties to the command line tools.
Can I use a proxy with the command line tools?
Yes. By passing in JVM properties through the EC2_JVM_ARGS environment
variable, you can specify proxy settings for the command line tools. For example, in Linux and
UNIX:
export EC2_JVM_ARGS="-Dhttp.proxyHost=http://my.proxy.com -Dhttp.proxyPort=8080"
Properties for configuring a proxy are described in the following table.
| Setting | Description |
|---|---|
| https.proxyHost | HTTPS proxy host |
| https.proxyPort | HTTPS proxy port |
| http.proxyHost | HTTP proxy host |
| http.proxyPort | HTTP proxy port |
| http.proxyRealm | Proxy realm (https and http) |
| http.proxyUser | Proxy username (https and http) |
| http.proxyPass | Proxy password (https and http) |
![]() | Note |
|---|---|
|