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

Error "The request must contain the parameter AWSAccessKeyId" if the ~/.aws/config file doesn't exist #120

Closed
quelgar opened this issue Aug 23, 2017 · 1 comment
Labels
bug This issue is a bug.

Comments

@quelgar
Copy link

quelgar commented Aug 23, 2017

I found this problem when running on an EC2 Linux instance that received its permissions via an instance profile. The aws CLI commands worked, but I had never run aws configure.

When running an app using preview-2 on this machine, I would just get: The request must contain the parameter AWSAccessKeyId (Service: EC2Client; Status Code: 400; Error Code: MissingParameter; errors. The same app would work on my local machine where I had configured an access key.

After some digging, I narrowed it down to ProfileCredentialsProvider, which was returning null, resulting in later providers in the default chain not being tried. If I explicitly used InstanceProfileCredentialsProvider, the app would work fine via the instance profile.

To get around the problem, I ran aws configure and didn't specify any values. This created a file ~/aws/config, and after that the ProfileCredentialsProvider worked as expected, and passed the authentication down the provider chain so that InstanceProfileCredentialsProvider got a chance to run.

@dagnir dagnir added the bug This issue is a bug. label Aug 23, 2017
spfink added a commit that referenced this issue Aug 25, 2017
@spfink spfink closed this as completed in 62f2d8e Aug 25, 2017
@shorea
Copy link
Contributor

shorea commented Sep 19, 2017

This is available in 2.0.0-preview-4

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

3 participants