Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boto not using the temporary IAM credentials contained in EC2 instance metadata #598

Open
danielchalef opened this issue Dec 12, 2017 · 0 comments

Comments

@danielchalef
Copy link

danielchalef commented Dec 12, 2017

boto, when called by odo, is not using the temporary IAM credentials contained in EC2 instance metadata and fails with an authentication error when attempting to access S3.

Steps to reproduce:

  1. Attach an EC2 Role with 'AmazonS3FullAccess' permissions to an EC2 instance.
  2. Start python from shell running in EC2 instance, and use boto to list the AWS account's associated buckets:
>>> import boto
>>> c = boto.connect_s3()
>>> rs = c.get_all_buckets()
>>> rs

This succeeds.
[<Bucket: ... >]
3. Attempt to load a CSV file in S3 into a pandas dataframe:

>>> df = odo('s3://.../dummy_data.csv', pd.DataFrame)

yields

...
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden
...

It appears that, when called from odo, boto is not using the temporary IAM credentials contained in the EC2 instance metadata.

@danielchalef danielchalef changed the title odo not using boto config for attached EC2 Role boto is not using the temporary IAM credentials contained in the EC2 instance metadata Dec 12, 2017
@danielchalef danielchalef changed the title boto is not using the temporary IAM credentials contained in the EC2 instance metadata boto not using the temporary IAM credentials contained in EC2 instance metadata Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant