Many AWS accounts keep database passwords, API keys and tokens in Systems Manager Parameter Store as plain String parameters, where anyone allowed to read the parameter sees the value and nothing about the parameter marks it as sensitive. This runbook shows how to find those parameters, how to move them to SecureString given that Parameter Store does not let you change a parameter's type in place, how to deal with the plaintext left in version history, and how to stop new ones appearing. It also covers who can read a SecureString once you have one, because the default key gives every principal in the account decryption rights. It is written for cloud security and platform engineers. The wider Systems Manager security model is in the AWS Systems Manager Security Guide; this page is the find-and-fix task.
This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.
Key takeaways
- Metadata finds the candidates without reading values.
DescribeParameterswith aTypefilter ofStringorStringListlists every unencrypted parameter, and names such aspassword,tokenorapikeypoint to the likely secrets. - You cannot convert a parameter in place. AWS documents that changing a
Stringto aSecureStringis not supported: you create a new parameter, move consumers to it and delete the old one. - History keeps the old plaintext.
GetParameterHistoryreturns the value of each retained version (up to 100), so overwriting a value does not remove what was there before. - A plaintext secret should be treated as exposed. Anyone who could call
GetParameter,GetParametersByPathorGetParameterHistorymay have seen it, so rotate the underlying credential as part of the fix. - SecureString with
aws/ssmis only a partial fix. AWS states every principal in the account can use theaws/ssmkey, so read access is still decided by SSM permissions alone; use a customer managed key where readers must be limited.
When you need this
Run this task when you inherit an account, after a cloud posture review flags Parameter Store, before granting a new team or tool read access to a parameter path, and as a recurring hygiene check. It applies equally to parameters created by hand, by infrastructure as code and by deployment tools, which often write configuration and credentials side by side under the same path.
The risk is concrete. A String parameter is returned in clear to any caller with a matching ssm:GetParameter* permission, and AWS documents that GetParametersByPath is authorised against the path requested rather than each parameter returned, so a broad path read pulls everything beneath it. Plaintext values also appear in tool output, CLI histories and logs wherever they are fetched.
Parameter types and what each protects
| Type or option | Value at rest | Who can read the value | Fit for secrets |
|---|---|---|---|
String | Not encrypted by Parameter Store with your key | Anyone with ssm:GetParameter* on the parameter or an ancestor path | No |
StringList | As String, comma-separated values | As String | No |
SecureString with aws/ssm | Encrypted with the AWS managed key | Anyone with ssm:GetParameter* who passes WithDecryption, because all principals in the account can use the key | Partly: encrypted and marked sensitive, but no second gate |
SecureString with a customer managed key | Encrypted with your symmetric KMS key | Principals with ssm:GetParameter* and kms:Decrypt on the key | Yes |
AWS documents some details that matter for the migration. Only symmetric KMS keys can encrypt parameters. Standard tier SecureString values (up to 4 KB) are encrypted with a direct KMS Encrypt call, while advanced tier values (up to 8 KB) use envelope encryption with GenerateDataKey. A standard parameter can move to advanced, but not back. Parameter names and other metadata are never encrypted, so a name like /prod/payments/stripe-secret-key discloses what the value is to anyone who can list parameters.
Before you start
- Two roles, kept separate: a discovery role with
ssm:DescribeParametersonly, which sees metadata and never values, and a tightly held review role withssm:GetParameteron the candidate list, used only to confirm content. - Every Region: Parameter Store is regional, so repeat discovery in every enabled Region, including ones you do not expect to use.
- Consumer map: the ability to search infrastructure as code, Lambda and ECS configuration, EC2 user data and application code for parameter names, so you know what breaks when a name changes.
- A customer managed key: a symmetric KMS key per environment or application, with a key policy naming the roles that will read and write the new parameters. See the AWS KMS Security Guide.
- Credential owners: for each secret you expect to find, who can rotate it at the source system (database, SaaS provider, internal service).
Step-by-step: find, migrate and rotate
- List unencrypted parameters. Call
aws ssm describe-parameterswith aParameterFiltersentry ofKey=Type,Option=Equals,Values=String, then repeat forStringList. Page through withNextToken: AWS notes results are best effort and a page can contain fewer thanMaxResults(up to 50) even when more exist. RecordName,Type,Tier,LastModifiedUserandLastModifiedDate. - Rank by name. Flag names containing terms such as
password,passwd,pwd,secret,token,apikey,api_key,private,credential,connection,dsnorwebhook. Names give a first cut but miss secrets stored under neutral names such as/app/config. - Confirm content with the review role. For flagged parameters and any JSON or connection-string style configuration blobs, fetch values with the review role and test them with secret detection patterns (provider key prefixes, private key headers, URLs with embedded credentials) and an entropy check. Run this in a controlled environment, do not write values to disk or logs, and record only the parameter name and the kind of secret found. See the Developer Secret Scanning Triage guide for classifying hits.
- Check history as well as the current value. Run
get-parameter-historyon parameters that are now harmless but were edited: aStringthat holds a placeholder today may hold a real password in an earlier version. Include history hits in your findings. - Find the consumers. Search for each parameter name in templates and code. CloudTrail
GetParameter,GetParametersandGetParametersByPathevents show which roles read the parameter or its path recently. - Create the replacement
SecureString. Because the type cannot be changed, create a new parameter, for example/prod/payments/db-password-v2or a new path such as/secure/prod/payments/db-password, with--type SecureStringand--key-idset to your customer managed key. OmittingKeyIduses the AWS managed key. Use a fresh value from the rotation in step 8 where you can, so the new parameter never holds the exposed one. - Move consumers. Update each consumer to the new name and to request decryption (
WithDecryptionin SDK calls). For CloudFormation, use the{{resolve:ssm-secure:name:version}}dynamic reference; AWS documents it only for a fixed list of properties (for exampleAWS::RDS::DBInstanceMasterUserPassword) and states CloudFormation never stores the resolved value. Grant each consumer rolekms:Decrypton the key, ideally with akms:EncryptionContext:PARAMETER_ARNcondition naming the parameter. - Rotate the credential. Change the password or key at the source system, write the new value to the
SecureString, and confirm consumers pick it up. Treat this as mandatory for anything that sat in aStringparameter that more than its owner could read. - Remove the old parameter. When CloudTrail shows no reads of the old name over a full business cycle, delete it with
delete-parameter. Then callget-parameter-historyon the old name and confirm it returnsParameterNotFound, so you know no retained version still holds the plaintext. If you must reuse the exact name, AWS asks you to wait at least 30 seconds after deletion before creating it again. - Record the change. Log the old name, new name, key used, consumers moved, rotation date and deletion date, as evidence for the review.
Decision guidance
| Situation | Option | Trade-off |
|---|---|---|
| Secret read by many roles in one account, no need to separate readers | SecureString with aws/ssm | No key policy to maintain; SSM permissions are the only gate |
| Readers must be limited, or the secret is high value | SecureString with a customer managed key | KMS cost and key policy work; adds a second, independent gate |
| Secret needs scheduled rotation, versions with staging labels, or cross-account sharing by resource policy | Move it to AWS Secrets Manager instead | Different API and cost model; see How to set up automatic rotation in AWS Secrets Manager |
| Value is not sensitive (feature flags, endpoints, AMI IDs) | Keep as String | Cheapest and simplest; keep it out of secret paths so reviews stay clean |
- New name or same name: a new name lets old and new run side by side and gives a clean rollback; reusing the name avoids consumer changes but forces a delete, a short outage window and the loss of rollback.
- Small and large estates: in one account with a handful of parameters, fix by hand in one change window. Across an AWS Organization, run discovery centrally from a security account role in every member account and Region, and track fixes per owning team.
Verify it worked, and roll back
- Type check: re-run the
describe-parametersfilter. Secret-named parameters should no longer appear asString, and theKeyIdof newSecureStringparameters should show your customer managed key rather thanalias/aws/ssm. - Read check: a call without
WithDecryptionshould return ciphertext, and a role withoutkms:Decrypton the key should be refused decryption. - Consumer check: CloudTrail shows reads of the new name from every expected role and no reads of the old name.
- Rollback: while the old parameter exists, point a failing consumer back at it. After deletion, rollback means writing the current value into a new parameter, so delete only after the business-cycle check. Keep the KMS key enabled: AWS lists a disabled or pending deletion key as a cause of
InvalidKeyIderrors.
Who can read a SecureString afterwards
Converting the type does not narrow who can read. AWS points out three behaviours that catch teams out:
- Every read action needs its own control. Parameter Store authorises
GetParameter,GetParameters,GetParametersByPathandGetParameterHistoryseparately. AWS warns that a principal denied the first three but allowedGetParameterHistorystill sees current values, includingSecureStringvalues. Usessm:GetParameter*in deny statements. - Path reads cover the whole subtree. A principal allowed
GetParametersByPathon/prodreceives/prod/payments/db-passwordeven if another statement denies that parameter for other actions. To protect a branch, denyGetParametersByPathon every ancestor path, including/. - The default key decrypts for everyone in the account. To stop use of
aws/ssmentirely, AWS suggests explicitly denyingkms:Decryptandkms:GenerateDataKeyon its ARN.
For a structured review of policy wildcards, see How to find AWS IAM policies with wildcard actions.
Prevent recurrence and measure
- Infrastructure as code checks: fail pipeline policy checks for
AWS::SSM::Parameteror Terraformaws_ssm_parameterresources of typeStringwhose names match secret terms, and for literal secret values in templates. - Deny by path: reserve a path such as
/secure/for secrets and use SCPs or permissions boundaries to blockssm:PutParameterunder it except through approved deployment roles. - Change monitoring: alert on CloudTrail
PutParameterevents that createStringparameters under secret paths, and onGetParameterHistorycalls against secret paths by unexpected roles.
Metrics (sample targets, set your own):
- Number of
StringorStringListparameters confirmed to contain secrets, trending to zero. - Percentage of
SecureStringparameters on a customer managed key, for paths classed as high value. - Percentage of migrated secrets rotated at the source after migration.
- Median days from discovery to deletion of the old plaintext parameter.
- Number of roles with
GetParametersByPathon/or another root path.
Where identity fits
The readers of these parameters are mostly non-human identities: EC2 instance roles, Lambda execution roles, ECS task roles and deployment roles. Instance roles on managed nodes often receive wide ssm:GetParameters rights so that agents work, which quietly makes them readers of every plaintext value. Treat each reader as an identity with an owner and a scope, and see the How to audit who can read secrets in AWS Secrets Manager runbook for the same effective-access method applied to Secrets Manager.
Framework mapping
| Framework | Reference | How this task supports it |
|---|---|---|
| NIST SP 800-53 Rev 5 | IA-5(7) No Embedded Unencrypted Static Authenticators | Removes stored plaintext credentials |
| NIST SP 800-53 Rev 5 | SC-28 Protection of Information at Rest; SC-12 Cryptographic Key Establishment and Management | Encrypts values under a managed key |
| NIST SP 800-53 Rev 5 | AC-6 Least Privilege | Path scoping and KMS key policy limit readers |
| NIST CSF 2.0 | PR.DS-01; PR.AA-05 | Data at rest protected; permissions managed with least privilege |
| ISO/IEC 27001:2022 Annex A | A.5.17 Authentication information; A.8.24 Use of cryptography | Secret authentication information stored protected |
| MITRE ATT&CK v20 | T1555.006 Cloud Secrets Management Stores; T1552.001 Credentials In Files | Reduces credentials an attacker can read from cloud stores and configuration |
Common failure patterns
- Overwriting the value and calling it fixed. The old plaintext stays in version history and remains readable through
GetParameterHistoryuntil the parameter is deleted. - Converting without rotating. Encryption protects the value from now on; it does nothing about copies already read by people, tools and logs while it was plaintext.
- Stopping at the AWS managed key. With
aws/ssm, any principal with SSM read rights can decrypt, so a broadssm:GetParameter*grant still exposes the secret. - Denying
GetParameteralone.GetParameters,GetParametersByPathandGetParameterHistorystay open unless denied too. - Checking only names. Secrets in JSON configuration blobs and connection strings under neutral names are missed unless values are scanned.
- Checking one Region. Parameters left in a test Region from an old deployment are a common blind spot.
Practitioner checklist
- Run
describe-parameterswithTypefilters forStringandStringListin every Region. - Rank by name, then confirm content with a separate, tightly held review role.
- Check version history of edited parameters for earlier plaintext secrets.
- Map consumers from code, templates and CloudTrail before changing names.
- Create new
SecureStringparameters with a customer managed key, scoped by path. - Rotate every credential that sat in plaintext.
- Delete old parameters after a full business cycle and confirm history is gone.
- Deny
ssm:GetParameter*and ancestor-pathGetParametersByPathwhere branches must be protected. - Add pipeline checks that block
Stringparameters under secret paths.
Standards and references
- AWS: Restricting access to Parameter Store parameters using IAM policies
- AWS: How Parameter Store uses AWS KMS
- AWS: PutParameter API reference
- AWS: DescribeParameters API reference
- AWS: GetParameterHistory API reference
- AWS: DeleteParameter API reference
- AWS: CloudFormation dynamic references to SecureString parameters
Related NHI Mgmt Group resources: AWS Systems Manager Security Guide · Cloud Secrets Managers Guide · AWS KMS Security Guide · How to audit who can read secrets in AWS Secrets Manager