close
Skip to content

Latest commit

 

History

History

README.md

aws-ssm-automation-0

This example follows the SSM Command post on my blog. It creates two SSM Command Documents:

  1. A multi-platform command document with the script embedded in the document
  2. A command document that retrieves the script from S3 and executes it on the instance

Setup

In order to use this, you need to have terraform on your machine.

Within this directory you'll need a file named secret.tf, which will contain:

locals {
  ip_address = "YOUR_IP_ADDRESS/32"
}

Ensuring that you replace YOUR_IP_ADDRESS with the IP address of your machine, so that you can connect to it and administrate it - however it is not required for the exercise.

You'll need a key pair for being able to log onto the EC2 machines created.

ssh-keygen -t rsa -b 4096 -m PEM -f vm_base
mv vm_base vm_base.pem

Deploy

Use Terraform to deploy to your account.

terraform init
terraform apply