aws-samples / aws-samples/aws-iamctl
s3 location for AWS policy throws AccessDenied
- Dominant language
- Python
- Stars
- 62
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
After installing `iamctl`, running with `init` fails with `AccessDenied` on the AWS policy download from s3. The file [https://awspolicygen.s3.amazonaws.com/js/policies.js](URL) mentioned in README.rst is available via browser.
```
host:src $ iamctl init
____ __ __ __ ___ ____ __
(_ _) /__\ ( \/ )/ __)(_ _)( )
_)(_ /(__)\ ) (( (__ )( )(__
(____)(__)(__)(_/\/\_)\___) (__) (____)
Initializing
Downloading IAM file from awspolicygen S3 Bucket: iam.json
Traceback (most recent call last):
File "/usr/local/bin/iamctl", line 24, in
sys.exit(main())
File "/usr/local/bin/iamctl", line 20, in main
return iamctl.iamctl.main()
File "/usr/local/lib/python3.7/site-packages/iamctl/iamctl.py", line 153, in main
globals()[kwargs.pop('subparser')](**kwargs)
File "/usr/local/lib/python3.7/site-packages/iamctl/iamctl.py", line 87, in init
response = s3.get_object(Bucket="awspolicygen", Key="js/policies.js")
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
```
Contributor guide
Research direction
Start in iamctl.py at the init function and compare its S3 policy location with the URL documented in README.rst. Reproduce the iamctl init failure and inspect the AWS response; done means init can download the policy file without AccessDenied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100