Instance Usage
The instance is your basic computation building block. Amazon EC2 offers multiple instance types from which you can choose. You can run as many or as few instances as you need at any given time.
For information about available instance types, see Instance Types.
Once launched, an instance looks very much like a traditional host. You have complete control of your instances; you have root access to each one and you can interact with them as you would any machine.
Here are some suggestions for making the best use of Amazon EC2 instances:
-
Do not rely on an instance's local storage for valuable, long-term data.
When instances fail, the data on the local disk is lost. Use a replication strategy across multiple instances to keep your data safe or store your persistent data in Amazon S3
-
Define images based on the type of work they perform.
For "Internet applications," you might define one image for database instances and another for web servers. Image creation and storage are cheap and easy operations, so you can individualize and customize as necessary. Specialized images can result in smaller AMI sizes, which will boot considerably faster.
-
Monitor the health of your instances.
You can make your instances work for you by configuring them to monitor each other. For example, you could create an image that contains an open-source monitoring tool such as Nagios or OpenNMS. Then, your other instances could report their health to the monitoring instance.
-
Keep your Amazon EC2 firewall permissions as restrictive as possible.
Only open up permissions that you require. Use separate groups to deal with instances that have different security requirements. Consider using additional security measures inside your instance (such as using your own firewall). If you need to log in interactively (ssh), consider creating a bastion security group that allows external login and keep the remainder of your instances in a group that does not allow external login.