How to download the Amazon Linux AMI

amazon ec2

I'd like to build upon the Amazon Linux AMI. How can I download one of their AMI images using ec2-download-bundle?

I tried

ec2-download-bundle -b amzn-ami-us-east-1/amzn-ami-pv-2012.03.1.x86_64.manifest.xml <auth>

But I don't think that is correct.

Best Answer

instance-store AMIs can only be downloaded if you own them. Even if the owner makes the bundle files world readable where they are stored in S3, they are encrypted in such a way that they can only be decrypted by the owner and by Amazon (so that Amazon can run it on an instance for you).

EBS boot AMIs are stored on EBS snapshots and you can only create a volume directly from the snapshot if the snapshot is public. However, in most cases you can start a new instance of a public EBS boot AMI and instantly stop it before it does much bootup. You could then detach that EBS volume from the instance, attach it to another instance and view it in almost as pristine a condition as the original AMI snapshot itself.

For most public AMIs (instance-store and EBS) you can simply log in after the instance boots and look at what is on the root disk. This is the simplest way to see what is in the AMI, though the boot up process could theoretically wipe files and hide processes from you if it were malicious (obviously not necessary in the Amazon Linux AMIs).

AMIs used in the AWS Marketplace have more protection in place to prevent access if the AMI provider wants to protect them, but many AWS Marketplace AMIs (including mine) let you log in to view the file system once booted.

Related Topic