AWS · Security, Identity, and Compliance
AWS Secrets Manager
Store, retrieve and automatically rotate secrets such as database passwords and API keys, encrypted with KMS.
On the SAA-C03 exam listEncryption and key managementAutomation
What it is and what problem it solves
AWS Secrets Manager stores secrets (database credentials, API keys, tokens) encrypted with KMS and returns them to authorised callers at run time, so secrets never sit in code or configuration files. It can rotate secrets on a schedule, using built-in rotation for Amazon RDS, Aurora, Redshift and DocumentDB, or a Lambda function you provide for anything else. Secrets can be replicated to other Regions.
When to use it
- Applications need database passwords or API keys without hard-coding them.
- Credentials must be rotated automatically to meet policy.
- Several accounts or Regions need the same secret with central control.
When to avoid it
- Plain configuration values and parameters that aren't secret: Systems Manager Parameter Store is simpler and has a free tier for standard parameters.
- Encryption keys themselves: those belong in KMS.
- Very high read rates without caching: use the client-side caching libraries.
Limits and quotas
| Item | Value | Context | Source |
|---|---|---|---|
| Maximum secret value size | 65,536 bytes Fixed limit |
Source checked |
|
| Secrets per Region | 500,000 Fixed limit |
Source checked |
|
| Versions per secret | 100 Fixed limit |
Source checked |
|
| GetSecretValue rate | 10,000 per second per Region Fixed limit |
Source checked |
Quotas and limits change. Check the linked source before designing around a number.
Cost model
What you pay for
A monthly charge per secret (prorated) and a charge per 10,000 API calls. New versions created by rotation are not charged separately.
Where it is cost-efficient
A modest number of high-value secrets with rotation, read through caching clients.
Where costs grow
Thousands of secrets (one per tenant or per user) and applications calling GetSecretValue on every request.
Cost controls and common surprises
Cache secrets in the application, keep non-secret configuration in Parameter Store, and delete unused secrets.
Prices differ by Region and change over time; see the pricing page linked under Sources.
Security
Controls the service provides
Encryption with KMS keys, resource-based policies on each secret, automatic rotation, and versioning with staging labels for safe rotation.
What you configure
Use a customer managed KMS key if you need key-level control, give each workload access to only its secrets, rotate regularly, and reach the service through a VPC endpoint from private subnets.
Logging and monitoring
CloudTrail records each access and change; EventBridge can alert on rotation failures.
Related security services
KMS, Lambda (custom rotation), RDS and Aurora (managed rotation), IAM, Parameter Store.
Shared responsibility
AWS stores and encrypts secrets. You decide who can read them and make sure applications use them safely.
Availability, backup and failure behavior
Secrets Manager is regional and highly available. Replicate secrets to a second Region for disaster recovery.
Common service combinations
RDS and Aurora (managed master passwords), Lambda and ECS reading credentials at start, CloudFormation dynamic references, EKS with the secrets store driver.
Business application examples
- An application reads its database password at start-up, and the password rotates every 30 days without a deploy.
- A partner API key stored once and shared with two accounts through a resource policy.
Exam cues and common confusions
- Automatic rotation of database credentials: Secrets Manager.
- Configuration values, cheaper, no built-in rotation: Parameter Store (SecureString for encrypted values).
- Remove hard-coded passwords from code: Secrets Manager or Parameter Store with an IAM role.
Related
Courses and lessons
- Secrets Manager vs Systems Manager Parameter Store · AWS Solutions Architect – Associate (SAA-C03) · Members
Services, comparisons and patterns
- AWS Key Management Service (AWS KMS) · Service
- AWS Systems Manager · Service
- Amazon RDS · Service
- AWS Lambda · Service
- KMS vs CloudHSM · Comparison
- Secrets Manager vs Parameter Store · Comparison
Sources
Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.