views:

72

answers:

2

I would like to download a public Amazon EC2 AMI, such as this one (Ubuntu Lucid), so that I can programmatically extract its contents.

How do I do this? I suspect there is an S3 address somewhere? This blog post looks like it once described this process, but the link seems to no longer work.

So far I can only find explanations of how to move around EC2 instance within AWS. I believe manifest files are an important piece of the puzzle.

+1  A: 

The AMI files stored on S3 are no different than any other file: you can download them if you know where they are stored on S3 and the files are either set to public-read or you have been granted read access. The AMI's are encrypted though, and you can only decrypt them if they are Linux AMI's and you have the AWS private key of the user who bundled the AMI.

From here: http://developer.amazonwebservices.com/connect/thread.jspa?messageID=131841

SamMeiers
Do you know where the AMI's are stored? See for example the link to a public Ubuntu AMI that I posted. In the thread that you reference someone asks the following and does not receive an answer, "How do you determine where they are stored on S3? This does not appear obvious to me." Do you know the answer?
AndyL
Probably this will help http://alestic.com/2010/01/ec2-ebs-boot-ubuntuThere's a link on the page where you can download the Canonical AMI.
Rodney Quillo
+1  A: 

Is there a real problem that you're trying to solve?

Because if there is, and you need the contents of a particular AMI to solve it, then your best approach is going to be starting an instance and taking a snapshot of its running EBS (which you can then download). If you're not using an EBS-backed instance, then you can use the Amazon tools to create an AMI from your current instance.

Anon
Are you suggesting that the only way to access an AMI is to start an instance and then take a snapshot? Shouldn't the AMI file itself reside somewhere accessible?
AndyL
I said the "best" approach.
Anon
And it may in fact be the only approach. AMIs are stored somewhere on S3. However, if they're stored with permissions that only allow the owner and EC2 to access them, then they might as well be inaccessible. You'll never be able to see them unless you have the appropriate keys.
Anon
Interesting. But what about *public* AMI's, such as the Ubuntu AMI that I linked to. I would suspect these are accessible to everyone. How would I go about finding their S3 address? Ultimately, I would strongly prefer not to have to start a new instance. Part of my goal is to take public AMI's out of the cloud in a programmatically accessible way.
AndyL
I have no idea why you'd suspect that. It would make much mroe sense if publisher retained sole access to the image, and simply granted EC2 read rights. There's absolutely no need to make an S3 bucket world-accessible, and the publisher would have to pay download charges (or take extra time to configure the bucket so that the downloader pays).
Anon
So hey, best of luck in doing whatever it is that you think you want to do. Hopefully this answer will be useful to someone else.
Anon