[[aws-secrets-manager-backend]]
= AWS Secrets Manager Backend

Spring Cloud Config Server supports link:https://aws.amazon.com/secrets-manager/[AWS Secrets Manager] as a backend for configuration properties.
You can enable this feature by adding a dependency to link:https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/examples-secretsmanager.html[AWS Java SDK for Secrets Manager].

[source,xml,indent=0]
.pom.xml
----
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>secretsmanager</artifactId>
</dependency>
----

The following configuration uses the AWS Secrets Manager client to access secrets.

[source,yaml]
----
spring:
  profiles:
  	active: awssecretsmanager
  cloud:
    config:
      server:
        aws-secretsmanager:
          region: us-east-1
          endpoint: https://us-east-1.console.aws.amazon.com/
          origin: aws:secrets:
          prefix: /secret/foo
          profileSeparator: _

----

AWS Secrets Manager API credentials are determined using link:https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/credentials.html#credentials-default[Default Credential Provider Chain].

[NOTE]
====
- When no application is specified `application` is the default, and when no profile is specified `default` is used.
- Both `label` and `defaultLabel` properties are ignored, when `ignoreLabel` is set to `true`.
====

