@@ -0,0 +1,1009 @@
+#!/usr/bin/python%0A%0A# Helper to export or unset AWS credentials from ~/.aws/credentials%0A# into environment variables%0A%0Aimport argparse%0Aimport sys%0Aimport ConfigParser%0A%0ACREDENTIALS_FILE='/Users/simon.so/.aws/credentials'%0A%0Aparser = argparse.ArgumentParser(description='Export or unset AWS credentials')%0Aparser.add_argument('-p', '--profile', dest='profile', default='default', help='AWS credential profile')%0Aparser.add_argument('-u', '--unset', action='store_true', help='Unset environment varibales')%0Aargs = parser.parse_args()%0A%0Aif args.unset:%0A    print 'unset AWS_ACCESS_KEY_ID; unset AWS_SECRET_ACCESS_KEY; unset REGION'%0A    sys.exit(0)%0A%0Ac = ConfigParser.RawConfigParser()%0Ac.read(CREDENTIALS_FILE)%0A%0Aaws_access_key_id = c.get(args.profile, 'aws_access_key_id')%0Aaws_secret_access_key = c.get(args.profile, 'aws_secret_access_key')%0Aregion = c.get(args.profile, 'region')%0A%0Aprint 'export AWS_ACCESS_KEY_ID=%25s; export AWS_SECRET_ACCESS_KEY=%25s; export REGION=%25s' %25 ( aws_access_key_id, aws_secret_access_key, region )%0A

Create aws_creds.py