Operation Information
How do I handle time synchronization between instances?
The instances run NTP (Network Time Protocol). For more information, go to www.ntp.org. NTP is particularly important if you plan on using any Amazon web services (such as Amazon S3 or Amazon EC2) from within an instance, since 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/2009-03-01/ to retrieve various instance-specific metadata, including the instance ID. For more information, see 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 Instance Metadata.
Is there a way to run a script on instance termination?
Not with any reliability. 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.
Since 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 users to launch your AMIs by modifying the AMI's launchPermission attribute. You can grant public launch permissions or explicit permissions to specific users. For more information, see Sharing AMIs.
Why do I need to reregister a rebundled 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 AMIs after rebundling.
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 | |
---|---|
|