Skip to content

Instantly share code, notes, and snippets.

View Jamie-BitFlight's full-sized avatar

Jamie Nelson Jamie-BitFlight

View GitHub Profile
@Jamie-BitFlight
Jamie-BitFlight / autoscaling_boto.py
Created February 6, 2017 22:24 — forked from numan/autoscaling_boto.py
Example of setting up AWS auto scaling using boto API
"""
The MIT License (MIT)
Copyright (c) 2011 Numan Sachwani
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@Jamie-BitFlight
Jamie-BitFlight / Terraform-Blue-Green-AWS.md
Created February 6, 2017 21:59 — forked from ryan0x44/Terraform-Blue-Green-AWS.md
Blue-Green AWS Auto Scaling Deployments with Terraform

A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.

In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.

Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.

Overview

I build my AMI's using Packer and Ansible.

@Jamie-BitFlight
Jamie-BitFlight / sqs.py
Created February 1, 2017 13:24 — forked from philchristensen/sqs.py
Minimal script for sending/reading from Amazon SQS using Boto/Python.
conf = {
"sqs-access-key": "",
"sqs-secret-key": "",
"sqs-queue-name": "",
"sqs-region": "us-east-1",
"sqs-path": "sqssend"
}
import boto.sqs
conn = boto.sqs.connect_to_region(
@Jamie-BitFlight
Jamie-BitFlight / aws-ssm.sh
Created February 1, 2017 13:23 — forked from lalyos/aws-ssm.sh
Aws ssm command execution
#!/bin/bash
set -eo pipefail
if [[ "$TRACE" ]]; then
: ${START_TIME:=$(date +%s)}
export START_TIME
export PS4='+ [TRACE $BASH_SOURCE:$LINENO][ellapsed: $(( $(date +%s) - $START_TIME ))] '
set -x
fi
debug() {