Skip to content

Instantly share code, notes, and snippets.

@hughdbrown
Created August 27, 2015 22:01
Show Gist options
  • Save hughdbrown/de183a06cb889f6d19e1 to your computer and use it in GitHub Desktop.
Save hughdbrown/de183a06cb889f6d19e1 to your computer and use it in GitHub Desktop.
import ConfigParser
import os.path
def get_creds():
botofile = os.path.expanduser("~/.boto")
with open(botofile) as f:
c = ConfigParser.ConfigParser()
c.readfp(f)
return tuple(
c.get("Credentials", key)
for key in ("aws_access_key_id", "aws_secret_access_key")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment