/packer-aws-windows-openssh

A Packer template and supporting files for creating an AWS Windows AMI with OpenSSH

Primary LanguagePowerShellMozilla Public License 2.0MPL-2.0

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