VyOS AMI build scripts
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


VyOS build-ami

NOTE: You can support VyOS development by using the official VyOS AMI from the marketplace: https://aws.amazon.com/marketplace/pp/B074KJK4WC (starting from $50/year).

The official AMIs are built with these exact scripts so if you build one for yourself, your own AMI will be functionally identical to the official ones.


The build scripts are based on ansible and awscli.

To install and configure awscli, follow the user guide: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html Make sure the python modules boto, botocore, and boto3 also gets installed.

Ansible is available from the repositories on most Linux distributions.

These scripts and playbooks should work on any Linux system, or, theoretically, on any system supported by ansible and awscli.

At this time Python3 support is limited by its supports by ansible, so it's safer to use Python 2.7.


./vyos-build-ami <VyOS ISO URL>

The baseline code now supports only VyOS >=1.2.0. If you want to build an AMI from VyOS 1.1.x, check out the 1.1.x tag.


Since there is no easy way to upload a disk image to AWS directly, the playbooks create a Debian Jessie instance and run a sequence of commands to create an EBS disk and unpack the VyOS image to it, emulating the installation procedure.


NOTE: If playbook fails, it leaves behind a t2.micro instance, an SSH key pair names "vyos-build-ami", and a security group also named "vyos-build-ami". If you want to restart the process from the beginning, remove those by hand.

Sometimes playbook tasks fail through no one's fault, for example, SSH timeouts if an instance takes too long to create.

Note that AMI name is fixed, and registering the AMI will fail if you try to run the playbooks when you already have one in your account. De-register the old one first.


These scripts are available under the MIT license. See the LICENSE file for more info.

build-ami playbooks were originally written by hydrajump (https://github.com/hydrajump) and are now maintained by the VyOS team.