This repository contains the examples used for the AWS Loft presentation. The slides are available online here:
To run the examples, you will need to:
- Install the bundle
- Set AWS credentials in your environment
Clone this repository and from within it run:
$> bundle install
Once this completes, confirm a working installation:
$> bundle exec knife cloudformation --help
The configuration for the knife-cloudformation
CLI
is found within the .chef/knife.rb
file. It uses
environment variables by default. The required variables:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION (set to us-west-2 for examples)
$> bundle exec knife cloudformation list
$> bundle exec knife cloudformation create my-json-stack --file raw/full.json
$> bundle exec knife cloudformation create my-sfn-stack --file cloudformation/template/full.rb --processing
$> bundle exec knife cloudformation events my-stack --poll
$> bundle exec knife cloudformation describe my-stack
Stack data:
$> bundle exec knife cloudformation inspect my-stack
Template:
$> bundle exec knife cloudformation inspect my-stack -a template
EC2 instance addresses within stack:
$> bundle exec knife cloudformation inspect my-stack -N
$> bundle exec knife cloudformation destroy my-stack