All, I am trying to use secrets manager in Spring Boot and Spring Cloud AWS. Here is my application.yml
:
cloud:
aws:
stack:
auto: false
credentials:
accessKey: ${aws_access_key}
secretKey: ${aws_secret_key}
instanceProfile: false
region:
static: us-east-1
spring:
profiles:
active: 'aws-dev'
config:
import: aws-secretsmanager:/dev/onprem/mib-air/backend
aws:
secretsmanager:
prefix: /dev/onprem/mib-air
name: backend
region: us-east-1
When I start the application I get error:
Caused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)),
SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey),
WebIdentityTokenCredentialsProvider: To use assume role profiles the aws-java-sdk-sts module must be on the class path.,
com.amazonaws.auth.profile.ProfileCredentialsProvider@55ecfe1d: profile file cannot be null,
com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@5b16b260: Failed to connect to service endpoint:
It seems, the Spring Boot failing to load AWS access key and secret key despite mentioning them earlier.