Instances
Instances are virtual servers running the operating system and additional software from the image they are started form. They function as real servers except that the underlying hardware is virtualized. Multiple instance types are available, offering various amounts of resources.
Running an instance
- Select Images under EC2 under the account you wish to launch the instance for.
- Select the image you wish to launch from the list of images.
- Click Run Instance.
- You may select a kernel and RAM disk you wish to run the instance(s) with, you must set the number of instances you wish to launch, the key pair, the instance type (it must be suitable for the image selected), the availability zone and pick the security groups the instance(s) will belong to. You may also specify custom data that will be forwarded to your instance(s) upon launch. It may be the contents of a file or entered directly.
- Click Launch to launch the instance(s).
All the running instances are available in Instances under EC2 under a specific account. They are also grouped by security groups to simplify the management of a large number of instances. Instances that have just been started and are not running yet are indicated by , running instances are indicated by and terminated ones are by .
Running more of a specific instance
- Select Instances (or a security group) under EC2 under the account you wish to launch the instance for.
- Select the instance you wish to launch more of from the list of instances.
- Click Run More.
- From here the process is similar to running a new instance (see Running an instance).
Just as real servers, instances can be rebooted if they crash or for other reasons.
Rebooting an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish to reboot.
- Click Reboot.
If an instance is no longer needed, it should be terminated, so its resources are freed and made available to other users.
Terminating an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish to terminate.
- Click Terminate.
A previously allocated address may be associated with an instance. Please note that an address must already be allocated in order to be associated.
Associating an address with an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish the address to be associated with.
- Select the Details tab.
- Click Associate Address.
- Select the address you wish to associate to the instance.
- Click OK.
Disassociating an address from an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish the address to be disassociated from.
- Select the Details tab.
- Click Disassociate Address.
A previously created volume may me attached to the instance at any time. Please note that the volume must already be created in order to be attached.
Attaching a volume to an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish the volume to be attached to.
- Select the Volumes tab.
- Click on the Add button.
- Select the volume you wish to attach and specify the name of the block device the instance will use (e.g. /dev/sdh).
- Click OK.
Detaching a volume from an instance
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish the volume to be detached from.
- Select the Volumes tab.
- Select the volume you wish to detach.
- Click on the Remove button.
You may log in to your instance (if the system running on it supports SSH remote login) to do administrative tasks.
Logging in to an instance using SSH
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance you wish to log in to.
- Click Launch SSH.
- A terminal window will pop-up with the SSH console. Please note that a key pair or password may be required to access your instance.
The system running on the instance may output information to the system console.
Checking the console output
- Select Instances (or a security group) under EC2 under the account the instance belongs to.
- Select the instance the console output of which you wish to see.
- Click Console.
