跳到主要内容

AWS Secrets Manager 后端

DeepSeek V3 中英对照 AWS Secrets Manager Backend

Spring Cloud Config Server 支持将 AWS Secrets Manager 作为配置属性的后端。你可以通过添加 AWS Java SDK for Secrets Manager 的依赖来启用此功能。

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>secretsmanager</artifactId>
</dependency>
xml

以下配置使用 AWS Secrets Manager 客户端来访问密钥。

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: _
yaml

AWS Secrets Manager API 的凭证是通过 默认凭证提供链 来确定的。

备注
  • 当未指定应用程序时,application 是默认值,当未指定配置文件时,default 会被使用。

  • ignoreLabel 设置为 true 时,labeldefaultLabel 属性都会被忽略。