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.