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

Invalid mode/filename error when assuming IAM role for cross-account S3 access #1063

Closed
dnlbrky opened this issue Dec 16, 2014 · 3 comments
Closed
Labels
bug This issue is a bug.

Comments

@dnlbrky
Copy link

dnlbrky commented Dec 16, 2014

Another AWS account has data in an S3 bucket that I would like to access from my AWS account. We followed the instructions from the AWS CLI talk at re:Invent 2014 for cross-account access using the CLI. We created the role s3CrossAccountAccess from the AWS console and added an entry to the config file for the assumerProfile profile:

[profile normalProfile]
region = us-east-1
[profile assumerProfile]
role_arn = arn:aws:iam::xxxaccountidxxx:role/s3CrossAccountAccess
source_profile = normalProfile
region = us-east-1

When I run aws s3api list-buckets --profile assumerProfile I get the error below. It also creates an empty folder at C:\Users\username.aws\cli\cache.

[Errno 22] invalid mode ('w') or filename: u'C:\\Users\\username\\.aws\\cli\\cache\\assumerProfile--arn:aws:iam::xxxaccountidxxx:role-s3CrossAccountAccess.json'

I'm using version 1.6.9 of the CLI for 64-bit Windows.

Any ideas what I'm doing wrong, or if this is maybe a bug in the CLI? It looks like it's trying to create an improperly named file.

@jamesls
Copy link
Member

jamesls commented Dec 16, 2014

There's a fix for this that's currently under code review: #1062

@jamesls
Copy link
Member

jamesls commented Dec 16, 2014

Fixed via #1062

@jamesls jamesls closed this as completed Dec 16, 2014
@dnlbrky
Copy link
Author

dnlbrky commented Dec 17, 2014

Awesome, thanks James. Your talk at re:Invent was very helpful. Keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants