Slim and up-to-date CentOS 6.2 AMIs for Amazon EC2

15/02/2012 – 09:22 pm

[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!

 

 

  1. 4 Responses to “Slim and up-to-date CentOS 6.2 AMIs for Amazon EC2”

  2. Can you please make them available in Zone: us-west-2a (oregon region)? West North California is more expensive.

    You Rock!

    By Gio Arteaga on Apr 28, 2012

  3. At the moment I’m lacking time, I’m afraid, but I’m planning on finishing development of my tool which would automatically migrate AMIs between regions. Then my images will be available in different regions much much quicker. Can’t give you a timeline yet, though. Bear with me.

    By admin on May 13, 2012

  4. Hi Gio,
    Probably a bit late now, but anyway, here’s the US-WEST-2 CentOS AMI (64bit): ami-8035b9b0

    By admin on Jun 19, 2012

  5. Great! I will try it. Thank you so much. Cheers.

    By Gio Arteaga on Jul 1, 2012

Post a Comment

*