サービス · セキュリティ、アイデンティティ、コンプライアンス
AWS Secrets Manager
Keeps secrets such as database passwords and API keys out of your code, and rotates them automatically.
このレッスンはまだ翻訳されていないため、英語で表示しています。
- 1The application asks Secrets Manager for the database password, and IAM checks that it may have it.
- 2The application connects to the database with that password.
- 3On a schedule, Secrets Manager changes the password in the database and in the secret.
流れ
- 1The application asks Secrets Manager for the database password, and IAM checks that it may have it.
- 2The application connects to the database with that password.
- 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.
混同しやすいもの
AWS Systems ManagerOne place to operate your servers: patch them, run commands, connect securely and store settings.
AWS Key Management Service (AWS KMS)Creates and controls the keys that encrypt your data, with every use logged in AWS CloudTrail.
- Access keys, passwords and secretsThe credentials that prove who you are, how to keep them safe, and where applications should store their secrets.