Can I download and run any Amazon Linux os on my local machine?

  • If yes:

    • Then from where I can download this?
    • And can I get image ready for VirtualBox?
  • If no:

    • What is the equivalent OS that matches the following version of EC2 Amazon AMI: 3.4.57-48.42.amzn1.x86_64 (I think it’sAmazon Linux AMI 2013.03)

I’m running Ubuntu 14.04 currently and I want to setup either the EC2 Amazon instance or any similar flavor of Linux OS.

I’ve an got an application from client that runs of above given machine, it runs on Ubuntu but with millions of tweaks and every time when new developer needs to start work on this application they need to either switch the system or spend thousand of hours to setup the PHP application.

I like to setup it to virtual machine and for any new developer we can clone and share the image so we can save the time to setup the project.

  • 1
    I know this is an old question but… A LAMP application should not be this complicated: “…either switch the system or spend thousand of hours to setup the php application.” There is utterly no way a half competently setup PHP application should require this level of tweaks. LAMP stacks are extremely portable. I would highly recommend using Vagrant and learn how to setup a provisioning script that will allow the automatic creation of the massively tweaked server with a few keystrokes. Dec 14, 2017 at 3:43
  • @riksof-zeeshan could you visit this question again and see if my answer is helpful for you? I think I've finished editing it...
    – Kingdon
    Jan 21, 2018 at 16:33
  • 1
    @Kingdon nahi bhai Jan 24, 2018 at 6:50

3 Answers 3


Yes, you can!

While on May 13, 2016 you can't do it... actually, as of today, December 13 2017, the answer is yes, you can install Amazon Linux 2 on your own machines and in his Amazon AMI image!


It is also available as virtual machine images for VMware, Oracle VM VirtualBox, and Microsoft Hyper-V virtualization solutions for on-premises development and testing.

This is from the announcement:


Virtual machine images and docker images:

Yahoo! From the FAQ you're supposed to generate a config.iso with user-data and meta-data:

... but it looks like this example of a cloud-init is a little more on point at explaining the different ways that you can set up the auth:


As a MacOS user rather than Linux desktop user, I also needed to know that the cdrtools homebrew package provides mkisofs which is apparently near identical to the genisoimage tool that is mentioned throughout the Amazon Linux cloud-init documentation.

mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data

It may also help to know that if the seed.iso file generated above is not connected on first boot, it will be ineffectual. (This took me too many login attempts to figure out on my own, and I didn't see it mentioned anywhere in the documentation that I skimmed.)

If you just want an ec2-user account with password set to password, attaching this init.iso file on first boot will do that.

d3fbbe38530f6c49964e6829e86d1133b4dfe2b7 /Users/kingdonb/Downloads/init.iso

The contents of that file are in this gist, for posterity in case the init.iso link becomes bad.

Hope this helps!

  • 1
    what is the default username, I deployed OVA and attached seed.iso before powering on... i tried with ec2-user which isn't working
    – asvignesh
    Jan 5, 2018 at 16:20
  • @asvignesh From what I've heard, there is not a default username and password (you need to modify seed.iso). I added a link to seed.iso with 'password' set for user1 and ec2-user accounts.
    – Kingdon
    Jan 5, 2018 at 19:56
  • I think this should be the accepted answer
    – Kingdon
    Mar 11, 2018 at 15:03
  • Except it doesn't answer the question. Amazon Linux 2 is not Amazon Linux, now is it? I think one would have to manually partition, instal something close, then rsync the / of an ec2 instance over the local / and re-install grub and fix a bunch of stuff that would inevitably break. Mar 12, 2018 at 2:39
  • 1
    Note: you can update your seed.iso file on subsequent VM starts-- you will need to change the instance-id value in meta-data. "Note: that the instance-id provided (iid-local01 above) is what is used to determine if this is “first boot”. So if you are making updates to user-data you will also have to change that, or start the disk fresh." reference Apr 12, 2018 at 22:53

EDIT late in 2017 AWS released Amazon Linux 2, which can be installed on a local machine.

ORIGINAL ANSWER, for Amazon Linux v1 I believe the answer is no, and that the closest OS would be CentOS, which is not close enough to avoid your "millions of tweaks" problem.

Amazon says "The Amazon Linux AMI is only available for use inside of Amazon EC2." (http://aws.amazon.com/amazon-linux-ami/faqs/). You can only export an AMI which you created by import (https://aws.amazon.com/ec2/vm-import/). And the list of images you can import/export does not include Amazon Linux (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html#vmimport-operating-systems).

CentOS is probably the closest OS (Amazon Linux was based on RedHat/CentOS many years ago), but Amazon Linux has diverged a long way, is updated more often and includes a set of tools and repositories you can't easily include in your system build. I haven't found a way of duplicating Amazon Linux and keeping it up to date.

OPINION: By providing a free, very up-to-date OS complete with all AWS tools, Amazon has made it pretty compelling to use their OS over any others. But it's not open source, it locks you into their platform much more than any other linux, and you'll probably end up paying Amazon for lots of dev environments which you otherwise would not have chosen to use. Good commercial decision for them, but if you choose another more open distribution you have a more portable platform and less errors between dev and production.

  • You've hit on the primary reason why everyone except possibly Amazon should avoid Amazon Linux: vendor lock-in. Their lackluster QA doesn't help, either... May 16, 2016 at 6:27
  • 1
    This was all 100% true until just about a month ago, when Amazon Linux 2 was announced.
    – Kingdon
    Jan 5, 2018 at 22:38
  • 1
    @Kingdon ... yeah, they move fast. I'll edit the answer. Jan 9, 2018 at 6:42
  • 1
    @andrewlorien It still doesn't really resemble any serious linux distribution. Yes you can download it and install it on your own computers... it's incredible that this needs to go into a Release Note in 2017. Building from scratch is still not possible afaik, as evidenced by the dockerfile that simply un-tar's a txz into the container root: github.com/aws/amazon-linux-docker-images/blob/… – I think the people that use Amazon Linux must be a different set than the people I'm used to dealing with in the open source community.
    – Kingdon
    Jan 9, 2018 at 16:26

I followed the directions at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html (as of 2021-Feb) and found two steps missing from the documentation:

  1. Step 1 (part 4) discusses writing an ISO with genisoimage (linux) or hdiutil (MacOS). It stands to reason that one would need a different tool for Windows: I used AnyBurn GUI or this command for magiciso

    miso.exe seed.iso -l cidata -a seedconfig\*

  2. Step 3 (part 5) talks about changing the Hyper-v settings. Don't forget to change the boot order in BIOS settings to "Boot from IDE". It defaults to boot from CD if you skip this step. It stands to reason that you can't boot off that ISO: there's hardly anything on it!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .