Do you have several AWS credentials and are confused which one is being used?
AWS has a defined Default Credential Provider Chain which dictates the order of which credentials it uses in the case where there are several.
The Default Credential Provider Chain Order for Java SDK is:
- Environment variables: "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY".
- Java system properties: aws.accessKeyId and aws.secretAccessKey.
- Web Identity Token credentials from the environment or container.
- The default credential profiles file: typically located at ~/.aws/credentials
- Amazon ECS container credentials: loaded from the Amazon ECS if the environment variable AWS_\CONTAINER_CREDENTIALS_RELATIVE_URI is set.
- Instance profile credentials: used on EC2 instances, and delivered through the Amazon EC2 metadata service.
Top comments (0)