aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.57k stars 4.13k forks source link

CreateDefaultRoles script is broken #1865

Closed andrewgross closed 8 years ago

andrewgross commented 8 years ago

Hey,

I was trying to follow the tutorial here. To setup permissions, I need to run aws datapipeline create-default-roles. This call fails. When you use --debug, you can see the following output:

2016-03-21 18:11:20,980 - MainThread - botocore.endpoint - DEBUG - Making request for <botocore.model.OperationModel object at 0x10acb9950> (verify_ssl=True) with params: {'body': {'Action': u'GetRole', 'RoleName': 'DataPipelineDefaultRole', 'Version': u'2010-05-08'}, 'url': u'http://iam.amazonaws.com/', 'headers': {'User-Agent': 'aws-cli/1.10.14 Python/2.7.6 Darwin/15.3.0 botocore/1.4.5'}, 'query_string': '', 'url_path': '/', 'method': u'POST'}

Note that the url key is not using SSL. Naturally, the IAM service does not accept non-SSL requests, and our command fails.

I investigated this issue and discovered that the CreateDefaultRoles script uses an old method signature when generating its IAM client. It uses positional args instead proper keyword args. This pushes an argument of None onto use_ssl, which will come out as boolean False.

I will submit a PR to fix the method signature.

kyleknap commented 8 years ago

Merged PR. Closing issue.