Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.87 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.87 KB

Windows AMI with ssh

This repository contains a Packer template and supporting files for creating an AWS Windows AMI with OpenSSH. The code in this repository is inspired by this blog post and accompanying code.

This is an updated implementation of packer-aws-windows-ssh with the following changes:

Usage

In order to build this image you need an AWS account an access key. Once you have that you need to set the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

You can put this in your .zshrc or .bashrc file, for example:

# AWS packer config
export AWS_ACCESS_KEY_ID="<ACCESS_KEY>"
export AWS_SECRET_ACCESS_KEY="<AWS_SECRET_ACCESS_KEY>"
export AWS_DEFAULT_REGION="ca-central-1"

Once that's setup you'll need to initialize the template:

packer init .

Now build the image:

packer build aws-windows-ssh.pkr.hcl