Skip to main content
Intermediatecomparison Verified ~6 min

Secrets Manager or Parameter Store: what goes where?

Source: Amazon S3: data consistency model

Quick answer

Credentials go in Secrets Manager: database and Snowflake passwords, API keys, because it supports automatic rotation and cross-Region replication.

Credentials go in Secrets Manager: database and Snowflake passwords, API keys, because it supports automatic rotation and cross-Region replication. Parameter Store holds configuration: bucket paths, environment flags; SecureString parameters are encrypted with KMS, but AWS itself recommends Secrets Manager for credentials. Jobs read them at run time through their IAM role, so nothing sensitive sits in code or job arguments.

Cost. Secrets Manager charges per secret and per call: USD 0.40 per secret per month plus USD 0.05 per 10,000 API calls (check the pricing page for your Region and for free-trial offers). Parameter Store standard parameters have no additional charge (up to 10,000 parameters per account and Region, values up to 4 KB). The advanced tier allows values up to 8 KB, up to 100,000 parameters and parameter policies, and it is charged. So use Parameter Store for the many plain settings and spend the per-secret fee only on real credentials.

Caching. Every read is an API call with some latency, and for Secrets Manager it is also billed. Cache the value instead of reading it on every request: in Lambda, use the AWS Parameters and Secrets Lambda Extension, which caches both services' values, or use the Secrets Manager client-side caching libraries, and refresh the cache on a timer so that rotated secrets are picked up.

Animated explanation

Secrets Manager

  • Passwords and API keys
  • Automatic rotation
  • Cross-Region replication

Parameter Store

  • Bucket paths, flags
  • SecureString with KMS
  • Configuration, not credentials
Both are read at run time through the IAM role of the job.

Key points

  • Secrets Manager: rotation
  • Parameter Store: config
  • SecureString + KMS
  • read via IAM role

Common mistakes

  • Storing database passwords as plain Parameter Store String values, which are not encrypted.
  • Putting every setting in Secrets Manager and paying the per-secret fee for harmless configuration.
  • Calling Secrets Manager on every request instead of caching, which adds latency and cost.
  • Caching a secret forever, so a rotated password breaks the job.
  • Passing credentials as job arguments or environment variables baked into code.

Best practices

  • Put credentials in Secrets Manager with rotation turned on, and settings in Parameter Store.
  • Use SecureString with a customer managed KMS key when a parameter is sensitive.
  • Allow each role only the specific secret or parameter path it needs.
  • Cache values with a short time to live so rotation still works.
  • Use hierarchical parameter names, such as /prod/orders/bucket, to allow path-based permissions.

Likely follow-ups

  • How does automatic rotation work in Secrets Manager?
  • What is the difference between standard and advanced parameters in Parameter Store?
  • How do you give a job access to one secret and no other?
  • How does the Lambda extension cache secrets, and how do you handle rotation?
  • Which one would you use for a feature flag, and why?

References

Discussion