ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

服务 · 安全性、身份与合规性

AWS Secrets Manager

Keeps secrets such as database passwords and API keys out of your code, and rotates them automatically.

本课尚未翻译,暂以英文显示。

KMS
应用程序
Secrets Manager
RDS
  1. 1The application asks Secrets Manager for the database password, and IAM checks that it may have it.
  2. 2The application connects to the database with that password.
  3. 3On a schedule, Secrets Manager changes the password in the database and in the secret.
The application gets its password at run time. AWS KMS keeps the secret encrypted.

分步说明

  1. 1The application asks Secrets Manager for the database password, and IAM checks that it may have it.
  2. 2The application connects to the database with that password.
  3. 3On a schedule, Secrets Manager changes the password in the database and in the secret.

是什么

Applications need secrets: database passwords, API keys and tokens. Writing them into the code is risky, because anyone who can read the code can read the secret. With AWS Secrets Manager, the application asks for the secret when it runs, and IAM decides whether it may have it.

Secrets Manager can rotate a secret on a schedule. Rotation changes the password in the database and in the secret at the same time, so the application keeps working without a code change. For Amazon RDS, Amazon Aurora, Amazon Redshift and Amazon DocumentDB, rotation is built in. For other secrets, such as API keys, you provide an AWS Lambda function that does the work.

是什么

Secrets are encrypted with AWS Key Management Service (AWS KMS), access to them is recorded in AWS CloudTrail, and they can be copied to other Regions for disaster recovery. You pay for each secret you store and for the requests you make.

要记住

  • Secrets Manager = store, retrieve and rotate secrets.
  • Automatic rotation is what sets it apart from Parameter Store.
  • No secrets in code: the application fetches them at run time.
  • Encrypted with AWS KMS, controlled by IAM, logged by CloudTrail.
  • Encryption keys belong in AWS KMS. TLS certificates belong in AWS Certificate Manager.

考试中

  • “Rotate database credentials automatically” or “remove hard-coded passwords from an application” points to AWS Secrets Manager.
  • “Create and manage encryption keys” is AWS KMS, not Secrets Manager.