AWS Secrets Manager vs SSM Parameter Store

AWS Secrets Manager vs SSM Parameter Store

Two AWS services that both store sensitive configuration — but they were built for different jobs. Here is exactly how each one works, and how to know which one your project actually needs.

Almost every application built on AWS needs to store something it should never expose publicly — a database password, a third-party API key, a certificate, or just a plain configuration value like “which environment is this” or “which S3 bucket should logs go to.” AWS gives engineers two different, official places to put this information: AWS Secrets Manager and AWS Systems Manager (SSM) Parameter Store. Beginners are frequently confused by this, and reasonably so — both services let you store a piece of text, both let you retrieve it later through an API, and both integrate with services like Lambda and ECS. So why does AWS offer two ways to do what looks, at first glance, like the exact same thing? This guide walks through both services from the ground up, explains what actually happens internally when you store and retrieve a value from each, and gives you a clear, practical framework for choosing correctly — because picking the wrong one at the start of a project is a mistake that gets expensive to undo later.

ACore Concepts

Before comparing them feature by feature, it helps to understand the original purpose each service was designed to solve.

SSM Parameter Store came first, as one small feature buried inside the much larger AWS Systems Manager toolkit — a suite originally built to help engineers manage fleets of EC2 servers. Parameter Store’s original job was humble: let engineers store configuration values, like a database hostname or a feature flag, in one central place instead of hardcoding them into scripts scattered across dozens of servers. Over time, AWS added the ability to mark a parameter as encrypted, which let it double as a basic place to store secrets too — but that was never its primary design goal.

AWS Secrets Manager was built later, specifically and only for one purpose: managing secrets — values like database passwords and API keys — safely across their entire lifecycle, including a feature Parameter Store was never designed to handle well: automatically rotating those secrets on a schedule without any human needing to manually change them.

Everyday Analogy

Think of Parameter Store as a large filing cabinet with labeled folders — great for organizing lots of documents, and you can even lock a folder with a key. Secrets Manager is more like a bank’s safe deposit vault built specifically for your most sensitive items: it not only locks them away, it can automatically swap the lock and issue you a brand-new key on a schedule, and it keeps a detailed log of every single time the vault was opened.

Definition

SSM Parameter Store

A hierarchical key-value store for configuration data and secrets, offered in a free Standard tier and a paid Advanced tier.

Definition

AWS Secrets Manager

A dedicated secrets-management service with built-in automatic rotation, fine-grained versioning, and native integration with RDS, Redshift, and DocumentDB credentials.

Shared Trait

Encryption at Rest

Both services can encrypt stored values using AWS Key Management Service (KMS), so the raw text is never stored in plain form.

Shared Trait

IAM-Controlled Access

Both rely on AWS Identity and Access Management (IAM) policies to decide exactly which users, roles, or services are allowed to read or write a given value.

i
The One-Line Rule

If a value is plain configuration (like a region name or a feature flag), use Parameter Store. If a value is a credential that should ideally be rotated and audited (like a database password), lean toward Secrets Manager.

BInternal Working

Both services look similar from the outside — you call an API, you get a value back — but what happens behind that API call is meaningfully different.

When you store a value in Parameter Store, you give it a hierarchical name, such as /myapp/prod/db-host, choose a type (String, StringList, or SecureString), and optionally choose a KMS key if you want it encrypted. If you mark it as a SecureString, AWS encrypts the value using that KMS key before saving it. When your application later calls GetParameter, AWS decrypts the value on the fly and hands it back — assuming your IAM role has permission both to read the parameter and to use the associated KMS key.

When you store a value in Secrets Manager, the process looks similar on the surface — you give it a name, a value (often structured as a JSON object containing a username and password together), and it gets encrypted with KMS automatically. The meaningful difference appears after storage: Secrets Manager can be configured with a rotation schedule and a rotation Lambda function. On that schedule, AWS automatically invokes your Lambda function, which contacts the actual database or service, generates a brand-new password, updates the database with the new password, and stores the new value in Secrets Manager — all without a human touching anything, and without your application ever needing to be manually updated with the new value, since it always asks Secrets Manager for the “current” version.

flowchart TB
    subgraph SM[AWS Secrets Manager]
      S1[Secret Value] --> S2[KMS Encryption]
      S3[Rotation Schedule] --> S4[Rotation Lambda]
      S4 --> S5[Updates Target DB Password]
      S4 --> S1
    end
    subgraph PS[SSM Parameter Store]
      P1[Parameter Value] --> P2[KMS Encryption - SecureString only]
    end
    App[Application / ECS / Lambda] -->|GetSecretValue| SM
    App -->|GetParameter| PS
        

Fig 1 — Both services sit between your app and KMS, but only Secrets Manager has a built-in rotation loop.

Another internal difference lies in how each service structures data. Parameter Store organizes values in a simple, flat-feeling hierarchy of names, similar to folders and files. Secrets Manager, by contrast, is built around the idea of a single secret potentially containing multiple structured fields at once — for example, one secret named prod/orders-db might internally hold a JSON blob with a username, a password, a hostname, and a port all together, which is a much more natural fit for database credentials than storing four separate parameters.

!
Common Confusion

A Parameter Store SecureString is encrypted just like a Secrets Manager secret — encryption strength is not the differentiator between these two services. The differentiator is the surrounding lifecycle: rotation, versioning depth, and native database integrations.

CData Flow & Lifecycle

A stored value is not static — it has a lifecycle from creation, through repeated reads, to eventual rotation or deletion. This lifecycle looks very different in each service.

1

Creation

An engineer or an infrastructure-as-code tool (like Terraform or CloudFormation) creates the parameter or secret, optionally attaching a KMS key and access policy.

2

Runtime Read

An application, container, or Lambda function calls the appropriate API at startup or on demand, using an IAM role attached to its compute environment — never a hardcoded static key.

3

Caching

Well-built applications cache the retrieved value in memory for some period, since calling the API on every single request would be slow and costly; both services support this pattern via official caching client libraries.

4

Rotation (Secrets Manager only, natively)

On the configured schedule, a Lambda function generates a new value, updates the downstream system, and stores the new version — old applications using a cached, now-outdated value must refresh soon after to avoid failed logins.

5

Deletion

Secrets Manager enforces a mandatory recovery window (7–30 days) before permanently deleting a secret, guarding against accidental deletion; Parameter Store deletes immediately with no recovery window.

This lifecycle difference at the deletion stage is a small but important detail that catches many teams off guard: because Parameter Store was originally built for configuration values rather than sensitive credentials, it never added a “soft delete” safety net. Secrets Manager, built specifically around the risk of losing access to a critical password, treats deletion far more cautiously by default.

Walking Through a Real Example: A Rotating RDS Password

A team stores their production PostgreSQL password in Secrets Manager and enables automatic rotation every 30 days, using AWS’s pre-built rotation template for RDS. Every 30 days, without any human involvement, Secrets Manager invokes a Lambda function that logs into the database as an administrator, creates a new password, updates the database, and stores the new secret version — all while keeping the previous version briefly available so in-flight connections don’t break mid-rotation. The application never needs a code deployment or config change to keep working.

DAdvantages, Disadvantages & Trade-offs

The clearest way to compare these two services is side by side, across the dimensions that actually matter for a real project.

DimensionSSM Parameter StoreSecrets Manager
Pricing (Standard tier)FreeCharged per secret, per month, plus API call charges
Pricing (Advanced tier)Charged per parameter, per month
Automatic rotationNot built in (requires custom automation)Native, with pre-built Lambda templates for RDS/Redshift/DocumentDB
Max value size4 KB (Standard) / 8 KB (Advanced)64 KB
VersioningBasic version historyFull version history with labeled stages (AWSCURRENT, AWSPENDING)
Cross-account sharingLimitedNative resource-based policies for cross-account access
Deletion safety netImmediate deletion7–30 day recovery window before permanent deletion

SSM Parameter Store — Strengths

  • Free for the vast majority of use cases (Standard tier).
  • Simple, hierarchical naming that fits general configuration well.
  • Already bundled into the broader Systems Manager toolkit many teams already use.

Secrets Manager — Strengths

  • Automatic, scheduled credential rotation with zero manual effort.
  • Purpose-built integrations with RDS, Redshift, and DocumentDB.
  • Stronger built-in auditing, versioning, and deletion protection for truly sensitive values.

The honest trade-off is cost versus capability. Parameter Store’s Standard tier is free, which makes it extremely tempting to use for everything, including secrets. Secrets Manager costs real money per secret per month, but that cost buys automatic rotation — a capability that, if built manually on top of Parameter Store, would require your own custom Lambda functions, your own scheduling, and your own careful handling of in-flight connections during a password change. For a handful of low-risk configuration values, that cost isn’t worth paying. For a production database password an attacker would love to steal, it usually is.

EDesign Patterns & Anti-Patterns

Teams that use both services well tend to follow a small set of consistent patterns — and the teams that get burned tend to repeat the same few mistakes.

Pattern

Split by Sensitivity

Put genuinely sensitive credentials (database passwords, third-party API keys) in Secrets Manager, and put everything else (feature flags, region names, bucket names) in Parameter Store.

Pattern

Environment-Prefixed Naming

Name parameters and secrets with a consistent hierarchy like /prod/service/key, so IAM policies can grant access using simple wildcard patterns rather than listing every resource individually.

Pattern

Client-Side Caching with TTL

Use official caching libraries (like the AWS Secrets Manager caching client) so applications don’t hammer the API on every request, while still refreshing periodically to pick up rotated values.

Pattern

Least-Privilege IAM Scoping

Grant each application or service role access only to the specific parameter paths or secret ARNs it actually needs, never a blanket “read all secrets” permission.

ANTI-PATTERN 01 Avoid
The Problem

Storing a production database password as a plain Parameter Store String (unencrypted) just to save a small amount of money by avoiding both SecureString and Secrets Manager.

Why It Hurts

Anyone with read access to that parameter — including, potentially, overly broad IAM policies or logging systems that capture API responses — can see the password in plain text with no encryption barrier at all.

Better Approach

At minimum, use SecureString with a customer-managed KMS key; for anything database-related, prefer Secrets Manager’s native rotation support instead.

ANTI-PATTERN 02 Avoid
The Problem

Fetching a secret from Secrets Manager or a parameter from Parameter Store on every single incoming request to an application, with no caching whatsoever.

Why It Hurts

This creates unnecessary latency on every request, drives up API call costs, and can hit AWS service throttling limits under real production traffic.

Better Approach

Fetch the value once at application startup or use a short-TTL in-memory cache, refreshing periodically rather than on every request.

FBest Practices & Common Mistakes

Beyond the big architectural choice, a handful of smaller operational habits determine whether either service actually stays secure in practice.

Always use customer-managed KMS keys rather than the AWS-managed default key when you need fine-grained control over exactly who can decrypt a given secret.
Enable AWS CloudTrail logging for both services so every read and write is auditable — this matters enormously during a security incident investigation.
Test your rotation Lambda function in a staging environment before enabling automatic rotation in production, since a broken rotation function can lock your application out of its own database.
Tag parameters and secrets consistently (by environment, team, and application) to make cost tracking and access reviews manageable as the number of stored values grows into the hundreds.
Never hardcode a fallback secret value in application code “just in case” the fetch fails — fail loudly and safely instead, rather than silently falling back to a default credential.

One mistake that repeatedly surfaces in real production incidents is a mismatch between rotation and connection pooling. When Secrets Manager rotates a database password, existing open connections that authenticated with the old password often keep working until they close — but new connection attempts must use the new password. Applications with long-lived, unclosed connection pools that never check for a refreshed secret can end up in a confusing state where some requests succeed and others silently fail authentication, right after a rotation event. Building in periodic secret refresh logic, not just a one-time fetch at boot, avoids this entirely.

Another frequent mistake is treating the “Standard” free tier of Parameter Store as a bottomless place to dump every secret in an organization simply because it’s free. As the number of stored values grows, the lack of native rotation, weaker cross-account sharing, and thinner audit granularity compared to Secrets Manager become real operational liabilities — the cost savings on paper can be dwarfed by a single leaked, never-rotated credential in a security incident.

GReal-World & Industry Examples

In practice, most mature AWS environments use both services side by side, deliberately, rather than picking only one.

A Typical Microservices Platform

An engineering team running dozens of microservices on ECS commonly stores general configuration — service URLs, feature flags, log levels — in Parameter Store, injected as environment variables at container startup, while storing every service’s database and third-party API credentials in Secrets Manager with rotation enabled.

CI/CD Pipelines

Build systems like AWS CodeBuild frequently pull deployment configuration (build settings, target environment names) from Parameter Store, while pulling any credentials needed to push artifacts or deploy to production from Secrets Manager, keeping the two concerns cleanly separated in access policies.

Multi-Account Organizations

Larger organizations with separate AWS accounts per team often centralize sensitive shared credentials in Secrets Manager in a security-focused account, using its native cross-account resource policies, while each team manages its own non-sensitive configuration independently in Parameter Store within its own account.

The pattern across all of these examples is consistent: Parameter Store handles the high-volume, low-sensitivity configuration sprawl that every application accumulates, while Secrets Manager is reserved deliberately for the smaller, higher-stakes set of values where automatic rotation, tighter auditing, and stronger deletion protection genuinely earn their cost.

HFrequently Asked Questions

Q1Can Parameter Store rotate secrets automatically at all?
Not natively. You can build your own rotation using EventBridge scheduled rules and a custom Lambda function, but you are responsible for building and maintaining that automation yourself — Secrets Manager provides this out of the box, with pre-built templates for common databases.
Q2Is Secrets Manager always more expensive than Parameter Store?
For a small number of values, yes, Secrets Manager charges a monthly fee per secret plus API call costs, while Parameter Store’s Standard tier is free. For larger scale or Advanced-tier parameters, the pricing gap narrows, but Parameter Store Standard remains the cheaper baseline option.
Q3Can I reference a Secrets Manager secret directly inside a Parameter Store parameter?
AWS supports a feature that lets Parameter Store retrieve a secret’s value from Secrets Manager dynamically, which some teams use to standardize how their applications fetch configuration through one consistent Parameter Store interface, while still getting Secrets Manager’s rotation benefits underneath.
Q4Which one should I use for a small side project?
For a small, low-traffic personal project, Parameter Store’s free Standard tier with SecureString encryption is usually more than sufficient, since automatic rotation and advanced auditing rarely justify their added cost and complexity at that scale.
Q5Do both services work the same way with AWS Lambda?
Both offer native integration with Lambda through IAM roles and, for Parameter Store, an official Lambda extension that adds local caching automatically. Secrets Manager offers a similar caching layer through its official client libraries for several languages.
Q6What happens to old versions of a secret after rotation?
Secrets Manager keeps prior versions labeled (such as AWSPREVIOUS) for a short period after rotation, which helps avoid breaking connections that were established just before the rotation event completed.

ISummary and Key Takeaways

Key Takeaways

  • Different origins, different strengths: Parameter Store grew out of general server configuration management; Secrets Manager was purpose-built for secret lifecycle management, including rotation.
  • Encryption is not the differentiator: both services can encrypt values with KMS — the real gap is in automatic rotation, versioning depth, and deletion safety.
  • Cost versus capability: Parameter Store Standard is free; Secrets Manager charges per secret but removes the need to build custom rotation automation yourself.
  • Use both, deliberately: mature AWS environments typically use Parameter Store for general configuration and Secrets Manager for genuinely sensitive, rotatable credentials.
  • Rotation changes operational behavior: applications must be built to periodically refresh cached secrets, not just fetch once at startup, to handle rotation gracefully.
  • Deletion protection matters: Secrets Manager’s recovery window guards against accidental, irreversible loss of a critical credential in a way Parameter Store does not.
  • The decision is about sensitivity, not difficulty: both services are similarly easy to use — the right choice depends on how sensitive and how rotation-critical the specific value is.