Sub topic 14
Cost and limits to plan for
This chapter assumes you know how to create parameters and secrets, and how KMS keys encrypt them. Prices and quotas change, and the figures below are the commonly published values. Check the AWS pricing pages and Service Quotas for your Region before you commit to a design.
Where the money goes
Three things can add cost: the stored items, the API calls, and the KMS keys.
| Item | Parameter Store | Secrets Manager |
|---|---|---|
| Storage | Standard parameters are free. Advanced parameters cost $0.05 per month each. | $0.40 per secret per month |
| API calls | Standard calls are free. Advanced parameters and higher-throughput mode cost $0.05 per 10,000 calls. | $0.05 per 10,000 calls |
| KMS | Free with `alias/aws/ssm`. A customer managed key adds its own charges. | Free with `aws/secretsmanager`. A customer managed key adds its own charges. |
A customer managed KMS key costs about $1 per month, plus a per-request charge for each Decrypt call. An application that fetches a secret on every request pays Secrets Manager and KMS for every one of those calls.
Worked example
Suppose an app has 40 secrets and makes 5 million GetSecretValue calls a month.
- Storage: 40 × $0.40 = $16.00
- Calls: 500 × $0.05 = $25.00
The calls cost more than the storage. Caching the values for five minutes can cut most of those calls. See the caching chapter.
Replicas count too. A secret replicated to a second Region is billed as a second secret.
Limits that shape a design
| Limit | Standard parameter | Advanced parameter | Secret |
|---|---|---|---|
| Maximum value size | 4 KB | 8 KB | 64 KB |
| Count per account per Region | 10,000 | 100,000 | 500,000 |
Parameter Store has three other limits to know:
- A
GetParameterscall accepts at most 10 names. GetParametersByPathreturns results in pages, so followNextToken.- Default throughput is limited per account and Region. For example,
GetParameterdefaults to about 40 requests per second.
Exceeding a throughput limit returns ThrottlingException. You can enable a higher-throughput setting for a fee. Caching and exponential backoff are usually cheaper.
Common mistakes
- Using advanced parameters by default. Only choose them for values over 4 KB, parameter policies such as expiration, or counts beyond 10,000. Converting a standard parameter to advanced is allowed. Converting back is not.
- Storing every setting as a secret. Non-sensitive settings such as hostnames fit standard parameters for free.
- Forgetting abandoned secrets. Unused secrets keep billing until they are deleted.
- Ignoring KMS request costs. A busy service with an uncached customer managed key pays for each decrypt.
Exercise
A team stores 200 secrets in Secrets Manager and makes 2 million GetSecretValue calls a month. What is the monthly Secrets Manager cost, excluding KMS?
Show answer
Storage is 200 × $0.40 = $80.00. Calls are 200 units of 10,000 × $0.05 = $10.00. The total is $90.00 per month.
Exercise
A config value is 6 KB and not sensitive. Which Parameter Store tier can hold it, and what does that cost per month?
Show answer
An advanced parameter, because standard parameters stop at 4 KB. It costs $0.05 per month, plus API charges for calls to advanced parameters.