You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 runaws 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 usedInstanceProfileCredentialsProvider
, 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 theProfileCredentialsProvider
worked as expected, and passed the authentication down the provider chain so thatInstanceProfileCredentialsProvider
got a chance to run.The text was updated successfully, but these errors were encountered: