AWS Builder Center
AWS Secrets Manager vs Parameter Store: Which One to Use

AWS Secrets Manager vs Parameter Store: Which One to Use

A practical comparison to help you choose the right place to store secrets and config values.

Series: AWS Security 30 Days, 30 Articles Challenge (31 articles)

  1. …
  2. 12
    AWS Secrets Manager vs Parameter Store: Which One to Use This article
Welcome to Day 11 of the 30 Days AWS Security Challenge. We've spent the last two days on encrypting data. Today we tackle a related problem: where do you actually store the passwords, API keys, and config values your applications need, without hardcoding them into your code or config files.

Why Hardcoding Secrets Is a Problem

It is tempting to just drop a database password or API key straight into your application code or a config file. It works, until that code ends up in a Git repository, a shared screenshot, or a log file, and now that secret is exposed to anyone who sees it. Rotating a hardcoded secret is also painful, since it means a code change and a redeploy every time.
AWS gives you two services built specifically to solve this: Secrets Manager and Parameter Store. Both let you store values securely and pull them into your application at runtime instead of hardcoding them, but they are not identical, and picking the right one depends on what you actually need.

What Parameter Store Does

Parameter Store, part of AWS Systems Manager, is a simple key value store for configuration data and secrets. You give it a name, a value, and a type, and your applications retrieve it by name when needed.
Parameter Store comes in two tiers:
  • Standard, which is free and covers most basic use cases
  • Advanced, which adds a higher storage limit and parameter policies, at a small cost
Values can be stored as plain text or encrypted using KMS, called a SecureString parameter, which is what you want for anything sensitive like a password or API key.

What Secrets Manager Does

Secrets Manager is purpose built specifically for secrets, and it adds a few capabilities Parameter Store does not have out of the box:
  • Automatic rotation, where Secrets Manager can rotate a database password on a schedule, updating both the secret and the actual database credential without any manual work
  • Built in integrations with services like RDS, making database credential management much simpler
  • Fine grained versioning of secret values, useful when you need to track exactly what changed and when
Everything stored in Secrets Manager is encrypted by default using KMS, no separate SecureString setting required.

The Real Difference: Cost and Rotation

If you strip away the details, the decision usually comes down to two things: do you need automatic rotation, and what is your budget?
Secrets Manager charges per secret stored plus API calls, while Parameter Store's Standard tier is free. If you have a handful of database credentials that genuinely benefit from automatic rotation, Secrets Manager's cost is easy to justify. If you mainly need to store non rotating configuration values, like a feature flag or a non sensitive setting, Parameter Store Standard is the more cost effective choice.

A Simple Way to Decide

Ask yourself these questions:
  • Does this value need automatic rotation on a schedule? If yes, use Secrets Manager.
  • Is this a database credential that integrates directly with RDS? Secrets Manager makes this easier.
  • Is this general application configuration, feature flags, or a secret that rotates manually and infrequently? Parameter Store Standard is fine, and free.
  • Am I storing a large number of simple values across many applications? Parameter Store scales well for this without extra cost.
Many real world setups actually use both, Secrets Manager for a small number of high value, rotating credentials, and Parameter Store for the broader set of application configuration values.

A Quick Practical Example

To store a database password in Secrets Manager through the console, go to Secrets Manager > Store a new secret, choose Credentials for RDS database, select the database, and Secrets Manager will handle storing and optionally rotating that credential going forward. Your application then retrieves the secret by name using the AWS SDK at runtime, instead of reading it from a config file.

Key Takeaways

  • Never hardcode secrets into application code or config files, use a dedicated service instead
  • Parameter Store is free (Standard tier) and works well for general configuration and simple secrets
  • Secrets Manager adds automatic rotation and deeper integrations, at a cost per secret
  • Choose based on whether you need rotation, not just based on which service sounds more "secure," since both encrypt data properly
  • Many teams use both together, matching each tool to the right kind of value
Tomorrow we move from application level secrets to the network layer, comparing Security Groups and Network ACLs and how each one controls traffic differently.

Series: AWS Security 30 Days, 30 Articles Challenge (31 articles)

  1. …
  2. 12
    AWS Secrets Manager vs Parameter Store: Which One to Use This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article