Sub topic 12
Choosing between Parameter Store and Secrets Manager
This chapter assumes you have read the earlier chapters on both services. You should know what a hierarchical parameter name is, what a SecureString is, and what a Secrets Manager secret looks like. Here you will turn that knowledge into a decision you can defend in a design review.
The decision is about features, not security
Both services can store encrypted values with AWS KMS. Both control access with IAM. Both write API calls to CloudTrail. Encryption at rest therefore does not separate them, and picking Secrets Manager "because it is more secure" is a weak argument.
The real differences are in what each service does around the value:
- Whether AWS can change the value for you on a schedule (rotation).
- How large the value can be and how many values you can store.
- What storage and API calls cost.
- How you share values across accounts and Regions.
- How values are versioned and referenced.
Side-by-side comparison
Treat the numbers below as a snapshot. Limits and prices change, so confirm them on the AWS pricing and quotas pages before you commit to a design.
| Dimension | Parameter Store (standard) | Parameter Store (advanced) | Secrets Manager |
|---|---|---|---|
| Maximum value size | 4 KB | 8 KB | 64 KB (65,536 bytes) |
| Number of items per Region | 10,000 | 100,000 | 500,000 |
| Storage cost | Free | Per parameter per month | Per secret per month |
| API cost | Free at default throughput | Charged per call | Charged per call |
| Built-in rotation | No | No | Yes |
| Expiration and change notifications | No | Parameter policies | Rotation schedule and events |
| Cross-account sharing | Not directly | Through AWS Resource Access Manager | Resource-based policy on the secret |
| Cross-Region replication | No | No | Yes, built in |
| Encryption | Optional (SecureString) | Optional (SecureString) | Always, with KMS |
Two rows matter most in practice: rotation and cost. Everything else usually decides the case only when you hit a limit.
Rotation is the main reason to pay for Secrets Manager
Parameter Store can hold a database password, but it never changes that password. Updating the value is your job, and so is keeping the database in sync with it. If you want to automate that, you build and operate the automation yourself.
Secrets Manager rotates through a Lambda function that follows a four-step contract: create a new version, set it in the target system, test it, and finish by moving the AWSCURRENT label. For some services, such as Amazon RDS master user passwords, AWS manages the rotation function for you. Because the old version stays available under the AWSPREVIOUS label, clients that cached it can keep working briefly during the switch.
Ask this question first: does this value need to change on a schedule, or can it be changed by a person when needed? If it needs to change automatically, choose Secrets Manager. Typical examples are database credentials, third-party API keys that support key replacement, and OAuth client secrets.
Cost shapes the choice at scale
Standard parameters cost nothing to store. Secrets Manager charges for every secret every month, plus API calls. For ten secrets that is trivial. For thousands of items, or for a service that fetches a value on every request, it adds up.
This suggests a simple split. Put the many low-risk values (hostnames, feature flags, log levels, endpoint URLs) in Parameter Store. Reserve Secrets Manager for the few values that benefit from rotation, replication, or tighter sharing controls.
Caching, covered in the previous chapter, reduces API cost on both services. It also helps you stay under throughput limits. A standard parameter has a default throughput limit on GetParameter, and heavy fan-out at startup, for example many containers starting at once, can trigger throttling.
Size and structure
A JSON secret with several related fields fits well in Secrets Manager, and the 64 KB limit leaves room for certificates and key bundles. Standard parameters stop at 4 KB, which is too small for some certificate chains or large JSON configuration.
You can move a parameter up to the advanced tier without recreating it:
aws ssm put-parameter \
--name /myapp/prod/tls/chain \
--value file://chain.pem \
--type SecureString \
--tier Advanced \
--overwriteThe change is one-way. A parameter cannot be moved back from advanced to standard. To get back to the free tier you must delete it and create a new standard parameter. Weigh that before you upgrade many parameters at once.
Sharing across accounts and Regions
Secrets Manager attaches a resource-based policy to a secret, so another account can read it once both sides grant access. The secret must be encrypted with a customer managed KMS key whose key policy allows the other account. The AWS managed key aws/secretsmanager cannot be shared across accounts.
Secrets Manager can also replicate a secret to other Regions. Replicas stay in sync with the primary, which suits disaster recovery and multi-Region applications.
Parameter Store has neither feature in its standard tier. Sharing advanced parameters across accounts goes through AWS Resource Access Manager. For multi-Region needs, you copy parameters yourself, for example with a deployment pipeline that writes the same values in each Region.
If many accounts or Regions need the same value, Secrets Manager does more of that work for you.
A decision flow
The flow is a starting point, not a rule. Cost pressure can push a borderline case toward Parameter Store, and an organizational policy such as "all credentials live in Secrets Manager" can push it the other way.
Common patterns
- Mixed application. Store
/myapp/prod/db/host,/myapp/prod/log_leveland feature flags in Parameter Store. Store the database credentials in Secrets Manager with rotation enabled. The application loads the whole path at startup and fetches the secret through a cached client. - Low-budget service. If rotation is handled by a person or an external tool, use SecureString parameters for everything. You pay nothing for storage and keep the hierarchy and IAM path controls.
- Shared platform credentials. A central security account owns the secret, replicates it to the Regions where it is needed, and grants read access to application accounts through the resource policy.
Common mistakes
- Choosing by habit. Teams often put every value in Secrets Manager "to be safe" and then pay for hundreds of secrets that hold hostnames.
- Choosing Parameter Store, then wanting rotation. If you store a database password as a SecureString and later need rotation, you must migrate the value and change every reader. Decide early, or read through an abstraction in your code so a later move touches one place.
- Forgetting that the services can be combined. An application can use both, and the reserved
/aws/reference/secretsmanager/path lets a reader that only knows the Parameter Store API read Secrets Manager secrets. The next chapters cover that reference. - Ignoring KMS in the cost. Customer managed keys add a monthly key charge and per-request charges. Many SecureString reads or secret reads with a custom key generate KMS requests too.
Summary of the criteria
Choose Secrets Manager when you need automatic rotation, built-in Region replication, resource-based cross-account sharing, or values up to 64 KB. Choose Parameter Store when you have many values, want free storage, need a clean hierarchy for configuration, or manage the change process yourself. Use both when your application has a few rotating credentials and a lot of ordinary configuration.
Exercise
Your team has 800 values: 790 are hostnames, feature flags and timeouts, and 10 are database passwords that must change every 30 days. Which service or services do you choose, and why?
Show answer
Use both. Store the 790 ordinary values in Parameter Store (standard tier, free storage, hierarchical paths), and store the 10 passwords in Secrets Manager with rotation enabled, because only Secrets Manager rotates automatically. This avoids paying a monthly fee for 790 secrets that do not need rotation.
Exercise
A parameter in the standard tier now needs to hold a 6 KB JSON document. What can you do, and what can you not undo?
Show answer
Standard parameters allow only 4 KB, so upgrade the parameter to the advanced tier (8 KB) with put-parameter --tier Advanced --overwrite. You cannot downgrade it afterwards. To return to the standard tier you must delete the parameter and recreate it. If the document may grow beyond 8 KB, use Secrets Manager instead.