Re-bundle (or update) an EC2 AMI

amazon ec2amazon-ami

I have bundled an AMI that I'm fairly satisfied with. However I know that eventually I'll need to modify it (e.g. for Debian security updates or to update other system software that I have in the AMI). Is it possible to update an image once it's been bundled? What if I bundled a new AMI with the same name, manifest, and S3 location? EC2 caches AMIs for a period of time; would it be thrown off guard by the fact that an AMI changed between launches?

I do understand that I can simply bundle an entirely new AMI, although I want to avoid a proliferation of images. Would I be better off storing at least some of my software (e.g. JRuby and such) on an EBS volume instead of the AMI itself?

Note that the "software" I'm referring to does not include my own deployable units, but is rather third-party software.

Best Answer

What I do is bundle the AMI with the same name. Then delete the AMI while the instance is running and the upload and register the new AMI. In terms of what's "better" for storing your software it really depends on how often you're going to updating or modifying it. If you don't mind going thru the bundle process then just leave it in the AMI.

p.s. Handy tip for bundling AMI's is do it inside a screen session so that you can walk away from the imaging process and not have to worry about a broken SSH connection.

Related Topic