Secrets Manager vs Parameter Store
When to store credentials in AWS Secrets Manager and when Systems Manager Parameter Store is enough, with tiers, rotation and limits.
The decision: does the credential need rotation and cross-account sharing, or is a parameter enough?
Legacy
For rotation, replication and KMS encryption of secrets see AWS Secrets Manager.
Both services keep configuration and credentials out of source code, encrypt values with AWS KMS, and are regional. Secrets Manager is built for secrets that need rotation. Parameter Store (a Systems Manager capability) is built for general configuration, with secrets as a side feature.
Which one to use
| Feature | Parameter Store | Secrets Manager |
|---|---|---|
| Built for | Config values, license keys, AMI IDs, some secrets | Database credentials, API keys, OAuth tokens |
| Encryption | Optional. SecureString type uses KMS | On by default, always KMS |
| Automatic rotation | No | Yes, by Lambda function or managed rotation |
| Random password generator | No | Yes |
| Cross-account access | Advanced tier parameters can be shared | Resource-based policy on the secret |
| Versions | Version history, one current value | Up to 100 versions per secret, tracked by staging labels |
| Cost | Standard tier free | Per secret per month plus API calls |
| Max value size | 4 KB standard, 8 KB advanced | 65,536 bytes |
| Quantity | 10,000 standard, 100,000 advanced per Region | 500,000 secrets per Region |
| CloudFormation reference | Yes | Yes |
Exam signal
"Store database credentials and rotate them every 30 days" means Secrets Manager. "Store a non-sensitive URL or a feature flag cheaply" means Parameter Store standard.
Parameter Store details
- Types are
String,StringListandSecureString. Callers must passWithDecryptionand needkms:Decryptto read aSecureString. - Parameter policies need the advanced tier (a standard parameter can be upgraded, an advanced one cannot be downgraded). Up to 10 policies per parameter.
| Policy | Effect |
|---|---|
| Expiration | Deletes the parameter at a set time |
| ExpirationNotification | EventBridge event a set number of days or hours before expiry |
| NoChangeNotification | EventBridge event when the value has not changed for a set period. Useful to catch stale passwords |
- Parameter Store can pass through Secrets Manager secrets. Use the
secretsmanager/<name>path under the/aws/referenceprefix withGetParameterorGetParameters. IAM policies on the secret still apply and there is no Parameter Store history for it.
Secrets Manager details
- Rotation updates both the secret and the database. Managed rotation (for supported managed secrets) needs no Lambda function. Others use a rotation Lambda function.
- Unlabeled versions are cleaned up past 100, but not within 24 hours of creation. Updating more often than every 10 minutes can hit the version quota.
- Cross-account requests are throttled against the caller's account, not the owner's.
- A resource policy can be validated with
BlockPublicPolicyto stop broad public grants. - Condition keys such as
aws:sourceVpcecan force access through a VPC endpoint.
Exam trap
Parameter Store has no automatic rotation. A question that asks for rotation without custom code points to Secrets Manager even if Parameter Store sounds cheaper.
Related
Further reading
IDS, IPS and Host-Based Security
Where network controls stop and host agents, Network Firewall and IMDSv2 take over. Source/destination check, file integrity, metadata hardening.
Securing Generative AI Applications
Map the OWASP Top 10 for LLM Applications to Amazon Bedrock Guardrails and the AWS controls around them.