
Parameter Store vs Secrets Manager vs Env Vars: Pick One
Why a dev-editable AWS whitelist belongs in Parameter Store, not Lambda env vars or Secrets Manager — and how to pick between them.
The requirement
An SES-based email service I built needed a recipient whitelist —
addresses the service is allowed to send to. The one hard requirement:
other developers on the team needed to update that list themselves,
without waiting on me or triggering a deployment.
That single requirement quietly ruled out the default choice and made
the "obviously more secure" choice wrong too — for reasons that only
became clear once I actually asked what each option was built for,
rather than what it sounded like it should be used for.
Why not Lambda environment variables
This was the default I almost didn't question. Env vars are right
there, zero extra services, zero extra IAM to configure.
They just don't fit the actual requirement. Changing an env var means
changing the Lambda's configuration, which means a deployment — even
if that deployment is "just" updating one value through the console,
it's still a change to the function's config that goes through
whatever change process your deployments go through. That's fine for
values that change rarely and are owned by whoever ships the code.
It's friction for a value other developers need to adjust on their
own, on their own schedule, without touching the function itself.
There's also no version history. If someone updates the list and
breaks something, your recovery path is "check deployment history and
hope the previous value is findable," not "look at the last version
and roll back to it."
Why not Secrets Manager either
This is the one that actually made me stop and think, because it's
the "secure-sounding" AWS service for exactly this kind of thing —
credentials, API keys, sensitive values. A recipient whitelist felt
adjacent enough to that category that reaching for Secrets Manager
seemed like the responsible choice.
It isn't, and the reason is specific: Secrets Manager's entire value
proposition is lifecycle management around rotation — automatically
generating new credential values on a schedule, with staged version
labels so a rotation Lambda knows which version is live versus being
rotated in. AWS's own guidance is direct about this: if you need
managed password rotation, Secrets Manager is the tool built for it.
A recipient whitelist will never rotate. There's no "new value" to
generate on a schedule — it's a list humans edit when the set of
approved recipients changes, which is a fundamentally different shape
of problem than "this credential needs to look different every 30
days." Using Secrets Manager here means paying its per-secret monthly
charge — it has no free tier — for an entire rotation subsystem that
will sit there unused, forever, because there's nothing to rotate.
That's the actual test I landed on: does this value need to change
on a schedule via automation, or does it need to be readable and
occasionally edited by a human? The first is Secrets Manager's job.
The second isn't, no matter how sensitive-adjacent the value feels.
Why Parameter Store fit
Once framed that way, Parameter Store was the obvious answer, not
because it's a lesser Secrets Manager, but because it's built for
exactly this shape of problem — configuration data that needs to be
centrally stored, versioned, and readable by an application, with
humans as the ones making changes:
- Free, at the Standard tier — up to 10,000 parameters, no additional charge. There's no rotation infrastructure I'm paying for and not using.
- Versioned automatically. Every edit is a new version, with the previous one still there if someone needs to roll back.
- Auditable via CloudTrail — every
PutParametercall is logged, so "who changed the whitelist and when" is answerable without building anything extra.
- Scopable by path. IAM policies can grant a developer edit access
to exactly this parameter's path —
/email-service/recipient-whitelist, say — without granting them broader Systems Manager or Secrets Manager permissions they don't need for anything else.
None of this is Parameter Store being cleverer than Secrets Manager.
It's Parameter Store not carrying machinery for a problem — rotation —
that this use case doesn't have.
The part I'd flag before anyone copies this decision wholesale
Getting the storage layer right answered "where does this live and
who can change it," which was the actual question I was trying to
solve. It didn't answer "what stops this service from emailing
someone not on the list if my application code has a bug" — that's a
separate, arguably more important question, and Parameter Store alone
doesn't touch it. If you're building something similar, it's worth
treating those as two different design decisions rather than assuming
solving the first one quietly solved the second.
The generalizable question
AWS has several services that can technically store a value you want
to keep around and read later — env vars, Parameter Store, Secrets
Manager, even a DynamoDB table for more complex cases. They're not
interchangeable just because they can all hold a string. The question
that actually sorts them isn't "how sensitive does this feel" — it's
"what does this value's lifecycle actually look like." Rotates on a
schedule via automation: Secrets Manager. Edited occasionally by
humans, needs to be cheap and simple: Parameter Store. Set once at
deploy time and never touched independently of the code: environment
variables are genuinely fine for that, and reaching past them isn't
automatically more responsible.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article