fix the env variable name needed for boto

pull/1/head
Raymond Yee 2013-06-12 18:26:50 -07:00
parent f2182f1a2e
commit 130ce6281e
2 changed files with 12 additions and 9 deletions

View File

@ -1033,12 +1033,13 @@
"\n",
"print \"\"\"#!/bin/bash\n",
"\n",
"export AWS_ACCESS_KEY={AWS_ACCESS_KEY}\n",
"export AWS_SECRET_KEY={AWS_SECRET_KEY}\n",
"\n",
"export AWS_ACCESS_KEY_ID={AWS_ACCESS_KEY_ID}\n",
"export AWS_SECRET_ACCESS_KEY={AWS_SECRET_ACCESS_KEY}\n",
"\n",
"# EC2 API tools\n",
"export EC2_ACCESS_KEY=$AWS_ACCESS_KEY\n",
"export EC2_SECRET_KEY=$AWS_SECRET_KEY\"\"\".format(**{'AWS_SECRET_KEY':secret, 'AWS_ACCESS_KEY':key})"
"export EC2_ACCESS_KEY=$AWS_ACCESS_KEY_ID\n",
"export EC2_SECRET_KEY=$AWS_SECRET_ACCESS_KEY\"\"\".format(**{'AWS_SECRET_ACCESS_KEY':secret, 'AWS_ACCESS_KEY_ID':key})"
],
"language": "python",
"metadata": {},
@ -1105,7 +1106,8 @@
],
"language": "python",
"metadata": {},
"outputs": []
"outputs": [],
"prompt_number": 19
},
{
"cell_type": "code",

View File

@ -538,12 +538,13 @@ iam.put_user_policy( user_name='ry-dev-3', policy_name='power_user_2013-06-12',
print """#!/bin/bash
export AWS_ACCESS_KEY={AWS_ACCESS_KEY}
export AWS_SECRET_KEY={AWS_SECRET_KEY}
export AWS_ACCESS_KEY_ID={AWS_ACCESS_KEY_ID}
export AWS_SECRET_ACCESS_KEY={AWS_SECRET_ACCESS_KEY}
# EC2 API tools
export EC2_ACCESS_KEY=$AWS_ACCESS_KEY
export EC2_SECRET_KEY=$AWS_SECRET_KEY""".format(**{'AWS_SECRET_KEY':secret, 'AWS_ACCESS_KEY':key})
export EC2_ACCESS_KEY=$AWS_ACCESS_KEY_ID
export EC2_SECRET_KEY=$AWS_SECRET_ACCESS_KEY""".format(**{'AWS_SECRET_ACCESS_KEY':secret, 'AWS_ACCESS_KEY_ID':key})
# In[ ]:
[policy_document(p, user_name='ry-dev-3') for p in iam_policy_names_for_user('ry-dev-3')]