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.


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.

  • 2
    I'd avoid doing that -- if there's a problem with your new AMI, there's no easy way to launch copies of the old one while you fix things. – Mark Rose Jan 19 '12 at 18:13

Although it probably doesn't help you now. It is much easier to bundle EBS backed instances. It is as simple as "stopping" the instance somehow (Via ec2-stop-instances, or xfs freeze, or just try your luck with a running one) then just snapshot the EBS volume and register it. The only tricky part is when launching the new instance to make sure you use the same AKI, which can be found in the info for the currently running instance. Also, the AMIs from EBS Backed Images are not stored in your standard S3 bucket, so you do not need to worry so much about proliferation, just deregister them when you are done.

Alternatively, you can try writing the regular AMI bundle to an attached drive, then snapshot and register that, although I haven't had much success with this yet. Moving instance-store to EBS backed isn't entirely smooth at the moment.

Amazon tracks AMI's by the AMI ID (ami-1a2s3d4f) not by the location and name in S3, so you will be fine to remove the old one and bundle the other one with the same name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.