Skip to Content
Asterrr's Handbook
3 · Infrastructure security

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.

StoresGetParameterGetSecretValuedecryptdecryptrotatenew passwordParameter StoreSecrets ManagerApplicationKMS keyRotationfunctionDatabase
The application fetches at runtime. Both services need kms:Decrypt for encrypted values. Only Secrets Manager rotates the database password itself.

Which one to use

FeatureParameter StoreSecrets Manager
Built forConfig values, license keys, AMI IDs, some secretsDatabase credentials, API keys, OAuth tokens
EncryptionOptional. SecureString type uses KMSOn by default, always KMS
Automatic rotationNoYes, by Lambda function or managed rotation
Random password generatorNoYes
Cross-account accessAdvanced tier parameters can be sharedResource-based policy on the secret
VersionsVersion history, one current valueUp to 100 versions per secret, tracked by staging labels
CostStandard tier freePer secret per month plus API calls
Max value size4 KB standard, 8 KB advanced65,536 bytes
Quantity10,000 standard, 100,000 advanced per Region500,000 secrets per Region
CloudFormation referenceYesYes

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, StringList and SecureString. Callers must pass WithDecryption and need kms:Decrypt to read a SecureString.
  • Parameter policies need the advanced tier (a standard parameter can be upgraded, an advanced one cannot be downgraded). Up to 10 policies per parameter.
PolicyEffect
ExpirationDeletes the parameter at a set time
ExpirationNotificationEventBridge event a set number of days or hours before expiry
NoChangeNotificationEventBridge 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/reference prefix with GetParameter or GetParameters. 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 BlockPublicPolicy to stop broad public grants.
  • Condition keys such as aws:sourceVpce can 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.

Further reading

On this page