Skip to content

Instantly share code, notes, and snippets.

View bmfurtado's full-sized avatar

Bruno Furtado bmfurtado

  • New York City Area
View GitHub Profile
@johntrimble
johntrimble / generate-ubuntu-ami-mapping.py
Created June 21, 2012 00:13
Python script for generating a mapping of regions to the latest AMI for a given Ubuntu distribution and instance type for use in CloudFormation template.
#!/usr/bin/env python
import urllib2
import json
import itertools
import sys
import argparse
def groupby(data, key):
kf = lambda x: x[key]
result = itertools.groupby(sorted(data,None,kf), kf)