[Update 20/Jun: On request I've added the 64bit version for US-West-2 (Oregon) and US-East-1 (Virginia); All other 64 bit AMIs have been updated]
As CentOS 6.x has finally caught up with RHEL’s update cycle (as far as possible for a clone/copy/fork/you name it), I thought it might be good to have up-to-date images on EC2. But to my surprise I didn’t find many. Maybe it’s because you can get RHEL instances there, but I still prefer not to be dependent on licensing.
Anyhow, most AMIs I’ve found are outdated (6.0) or littered/bloated or heavily customised. I didn’t find a single AMI to my liking in either Europe or in the US regions. Plus, I wanted SELinux in enforced mode, which the vast majority of AMIs out there don’t offer and which is a bit of a nuisance to rectify later (due to long relabeling procedure and required reboot). Hence I created my own, which I made public.
The 32bit AMI works on t1.micro, m1.small and c1.medium out of the box. It’s wrapped into a 10GB EBS volume, 2GB of which are configured as swap space. The AMI is based on a groupinstall core (aka minimal installation). At startup it will gather your SSH key and chuck it into the authorized_keys2 file. The default user is ec2-user and root login is not allowed — going with Amazon’s best practices there.
If you prefer to log on as someone else, just type the username into the Userdata field when you create the instance via web console, or use the correct parameter (-d) with ec2-run-instances. I would for example just type carsten, and my SSH login will be carsten instead of ec2-user. I thought this would be a useful idea, if you run lots of instances and prefer to use your own login name. Old habits die hard as we know
These AMIs are publicly available as of now (locations/images in bold letters have been added or updated mid June):
- eu-west-1: ami-c5053cb1 (32 bit) and ami-1fa4a16b (64 bit)
- us-east-1: ami-84b210ed (64 bit)
- us-west-1: ami-2f9bc26a (32 bit) and ami-af6b4eea (64 bit)
- us-west-2: ami-8035b9b0 (64 bit)
- ap-southeast-1: ami-76b8fc24 (32 bit) and ami-4efdbb1c (64 bit)
Core features again:
- CentOS 6.2, no 3rd party repos, last update 15/Feb/2012 (32bit), 16/Feb (64bit)
- based on ‘groupinstall core’ (+ openssh_clients for scp)
- SELinux enabled and enforced
- swap preconfigured and part of the volume (/dev/xvde2)
- login user with sudo access either ec2-user or user specified at launch in the userdata field
- 32 bit version works on t1.micro, m1.small and c1.medium
- 64 bit version works on t1.micro and all other 64 bit instance types (not tested on the cc1, cc2 and cg1 monsters)
- ephemeral storage is made available, where the instance type permits (all but t1.micro); partitioning/formatting is your job
However: Use at your own risk! It’s a clean CentOS setup on EC2, no dirty trickery or other changes which require my support or make it a non-CentOS setup. Hence, use the normal support channels for questions related to CentOS (or use my contact form and have some cash available to spend :P)
Have fun and feel free to give feedback here or via contact form!