Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



This project enables running an Amazon Linux AMI on a local VirtualBox or VMWare virtual machine via Vagrant.


Preserve all the benefits of using the Amazon Linux AMI in production while minimizing differences between EC2 and local development environments.



./ --ami-name amzn-ami-hvm-2014.09.2.x86_64-gp2 [--vpc-name name] [--yum-proxy url]
./ --ami-name amzn-ami-hvm-2015.03.1.x86_64-gp2 [--vpc-name name] [--yum-proxy url]
./ --ami-name amzn-ami-hvm-2015.09.1.x86_64-gp2 [--vpc-name name] [--yum-proxy url]
./ --ami-name amzn-ami-hvm-2016.03.3.x86_64-gp2 [--vpc-name name] [--yum-proxy url]

These examples export vagrant box files named and or and To build VMWare boxes, use the option --provider=vmware. You must have VMWare Fusion Pro and the vagrant-vmware plugin installed for VMWare to work. To build VirtualBox boxes, use the option --provider=virtualbox (or leave it off as it is the default).


The script will:

launch builder instance
    attach source image volume (device -> vmdk)
        chroot - remove aws dependencies
        chroot - add vagrant user
        create vmdk
download vmdk

package-[virtualbox/vmware] (vmdk -> box)
    create vmware/virtualbox vm
    package vagrant box

install-guest-additions-[virtualbox/vmware].sh (box -> guest box)
    install guest additions
    apply security updates
    package vagrant box


Host software

The software has been tested using:

  • VirtualBox 5.2.X
  • VMWare Fusion Pro 10.1.X
  • Vagrant VMware plugin
  • Vagrant 2.1.1
  • Python 2.7
    • boto3 1.2.3
    • paramiko 1.16.0
    • scp 0.10.2

Example on MacOS X host using brew:

brew tap caskroom/cask
brew install brew-cask
brew cask install virtualbox
brew cask install vagrant

pip install -r requirements.txt

AWS account and credentials

AWS account should have default VPC or explicit VPC. Requires AWS credentials with permissions to:

  "Statement": [{
      "Effect": "Allow",
      "Action" : [





      "Resource" : "*"

Access to Amazon repositories

Since the release of the Amazon Linux Container Image, the repositories are public. The yum proxy or VPN is no longer required.

The repository urls are only accessible from within the AWS environment. To access these repositories locally there are several options:

  1. Use VPN connection to EC2, such as OpenVPN Access Server with Viscosity client, and route S3 prefixes over the VPN. See aws ec2 describe-prefix-lists.
  2. Launch HTTP proxy in EC2 with security group restricted to your IP addresses, and configure image --yum-proxy.


This project enables running an Amazon Linux AMI on a local VirtualBox virtual machine via Vagrant.




No releases published
You can’t perform that action at this time.