Skip to content

Instantly share code, notes, and snippets.

@ipmb
Created March 24, 2011 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ipmb/885719 to your computer and use it in GitHub Desktop.
Save ipmb/885719 to your computer and use it in GitHub Desktop.
from boto.iam import IAMConnection
iam = IAMConnection(aws_key, aws_secret)
iam.create_user('user')
iam.create_group('group')
iam.put_group_policy('group', 'EC2', '{"Statement":[{"Effect":"Allow","Action":"ec2:*","Resource":"*"}]}')
iam.add_user_to_group('group', 'user')
iam.create_access_key('user')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment