This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
Closed
Description
Environment
- Java 10.0.1
- Spring Boot 1.5.14.RELEASE
- spring-cloud-aws-autoconfigure 1.2.2.RELEASE
- spring cloud: Edgware.SR3
Issue
I am having some trouble with org.springframework.cloud.aws.autoconfigure.context.ContextCredentialsAutoConfiguration
When running my app locally inside Docker with the following environment variables set:
cloud.aws.credentials.accessKey=xxx
cloud.aws.credentials.secretKey=yyy
my app works as I expect. However, when I run it on docker on an EC2 instance with the same environment variables the app fails when calling SQS due to the not having permission.
I have set:
cloud.aws.stack.auto=false
cloud.aws.credentials.instance.profile=false
both locally and on EC2.
Should I define my own com.amazonaws.auth.AWSCredentialsProvider
bean or should the default auto config behaviour be enough? I am confused about why the auto config seems to be favouring an instance profile or some other credentials over the ones provided via the environment.