Setup Amazon AWS EC2 instance with CentOS

EC2-CentOSAmazon AWS provides a so called Free Tier. This is a free subscription for all the AWS services for one year. It includes an EC2 instance and EBS Volumes, which is nice to test the AWS service. You can see details about the included services and their limitations at AWS Free Usage Tier.

When I was first signing up for the Amazon AWS free Tier it was complicated to work out all these abbreviations, but after some reading it is quite simple to understand them.

Advertisements
EC2 A virtual server instance you can start and stop from the AWS console.
EBS The smallest kind of EC2 instance (a ‘micro’ instance) does not have a “harddisk”. The “Elastic Block Store” provides such a virtual harddisk that can be assigned to an EC2 instance.
Elastic IP As the name implies, these are the IP addresses you can assign to the EC2 instance.
Security Groups A more common term for this is “Firewall”. These firewall rule-sets can be assigned to the EC2 instance.
Key Pairs When a new EC2 instance is created you assign a key pair to be able to login initially. For more details read my article about SSH passwordless login with SSH key.

As a first step you need to register for the Amazon AWS service.

As I was not really sure which AMI image to trust, I decided to check if the website of the distribution offers a specific AMI image and found that CentOS provides a list of their AMI images at wiki.centos.org/Cloud/AWS. Follow the link in the table to directly configure and launch an instance.

On the AWS configuration page, make sure you select the correct region. If you select the wrong region, the SSH keys and Security Groups will not show up in the configuration and it will not be possible to attach EBS volumes to the instance.

After you have followed the configuration and clicked on ‘Launch’, there will be a link to the Amazon AWS Console. This Console is the management point for all your AWS instances. From there, the first thing you have to do is assign an IP address to your instance. In the section “Elastic IP” click on “Allocate New Address”. The IP address is now assigned to your account but not to your instance. To do so, select the IP address and click on “Associate Address” and select the created instance.

With this done, the instance is running and should be reachable via SSH and the SSH key you have.

$ ssh root@123.123.123.123 -i ssh-key-filename.pem

As soon as you are logged in you can start configuring your instance as you want; installing software packages, configuring services and so on.

If the 8GB EBS store that is created automatically is not enough, you can create a second EBS volume and assign that to your instance.


Read more of my posts on my blog at http://blog.tinned-software.net/.

This entry was posted in Linux Administration and tagged , , , , , . Bookmark the permalink.