Skip to content

Instantly share code, notes, and snippets.

View mattc41190's full-sized avatar
🐌
there is no effort without error

Matt Cale mattc41190

🐌
there is no effort without error
View GitHub Profile
#! /usr/bin/env python
import sys
from boto import ec2, cloudformation
import boto.utils
def get_group_info(ec2conn, instance_id) :
reservations = ec2conn.get_all_instances(instance_id)
instance = [i for r in reservations for i in r.instances][0]
if instance.tags.has_key('aws:autoscaling:groupName'):
"PrivateSubnetA": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"AvailabilityZone": {
"Fn::Select": [
0,
{
"Fn::GetAZs": {
"Ref": "AWS::Region"