Sitelet https://github.com/aws/aws-cli/issues/1063
Skip to content

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

Description

@dnlbrky

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions