Amazon Elastic Compute Cloud
User Guide (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Operation Information FAQ

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.

SettingDescription
https.proxyHostHTTPS proxy host
https.proxyPortHTTPS proxy port
http.proxyHostHTTP proxy host
http.proxyPortHTTP proxy port
http.proxyRealmProxy realm (https and http)
http.proxyUserProxy username (https and http)
http.proxyPassProxy password (https and http)
[Note]Note

https.proxyHost should be used when EC2_URL points to an https host, and http.proxyHost when EC2_URL points to an http host.