SecretsAWS
AWS Secrets Manager or Parameter Store
Both services can store an encrypted value and return it through an API call. They differ in rotation, sharing across accounts, size limits and how you pay, and AWS itself says which one to use for credentials that rotate.

What AWS recommends
AWS describes Secrets Manager as purpose-built for managing secrets such as database credentials and API keys. The Parameter Store documentation says the same thing from the other side: AWS recommends Secrets Manager for credentials that need automatic rotation, access across accounts or fine-grained audit logging.
Parameter Store is a tool in AWS Systems Manager for storing data as parameters with values, under hierarchical names. AWS describes its standard tier as best for most configuration data and low-scale workloads.
Rotation
In Secrets Manager you can set up automatic rotation. The documentation lists these forms:
- Managed rotation. For most managed secrets, the service configures and manages rotation for you. It does not use a Lambda function.
- Rotation by Lambda function. Every other type of secret is rotated by a Lambda function, which updates both the secret and the database or service behind it.
- Managed external secrets. For secrets held by Secrets Manager partners, the rotation updates the secret on the partner's system.
You configure an automatic rotation schedule for each secret. Staging labels keep track of versions during rotation: a request with no version returns AWSCURRENT, and AWSPREVIOUS returns the previous version.
Parameter Store has parameter policies, for parameters in the advanced tier. Expiration deletes the parameter. ExpirationNotification and NoChangeNotification initiate events in Amazon EventBridge.
Cross-account access
Reading a Secrets Manager secret from another account takes two grants: one in a resource policy and one in an identity policy. This is the resource policy from the AWS example, with a role of your own as the principal:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:role/my-app"
},
"Action": "secretsmanager:GetSecretValue",
"Resource": "*"
}
]
}You cannot use the AWS managed key aws/secretsmanager for cross-account access. Encrypt the secret with a KMS key that you create, and add a statement to its key policy. To read the secret value, the other account's principal needs kms:Decrypt. To retrieve a secret from another account, the caller must use its ARN.
In Parameter Store, sharing across AWS accounts is supported for advanced parameters and not supported for standard parameters.
Size limits, tiers and cost
- Secrets Manager. The maximum size of a secret value is 65,536 bytes.
- Standard parameters. The maximum value size is 4 KB, with up to 10,000 parameters for each account and Region. Parameter policies and sharing across accounts are not supported. There is no additional charge.
- Advanced parameters. The maximum value size is 8 KB, with up to 100,000 parameters for each account and Region. Parameter policies and sharing are supported. Charges apply.
You can change a standard parameter to an advanced parameter. You cannot change it back. AWS says the route back is to delete the parameter and create it anew as a standard one.
On cost, the Secrets Manager documentation states that billing follows usage and that there are no minimum fees and no setup fees. Rotation by Lambda function is charged at the Lambda rate. AWS also recommends client-side caching of secret values, which improves speed and reduces your costs.
Encryption with KMS
Secrets Manager encrypts secrets with a KMS key. The AWS managed key aws/secretsmanager is free to use. If you create your own KMS keys, AWS charges you at the AWS KMS rate.
In a SecureString parameter the name stays in plaintext and only the value is encrypted. Leave out the KMS key and Parameter Store encrypts with the AWS managed key whose alias is aws/ssm. You cannot establish access control policies for that default key. With a customer managed key, you manage encrypt and decrypt permissions through IAM policies and key policies.
Reading a value from each
These commands come from the AWS documentation. The names are the ones in its examples, so use your own:
aws secretsmanager get-secret-value \
--secret-id MyTestSecret
aws ssm get-parameter \
--name MyParameter \
--with-decryption- The first call requires
secretsmanager:GetSecretValue. It also needskms:Decryptif the secret is encrypted with a customer managed key. - The second call returns the plaintext value. With
--with-decryption, Parameter Store runs the AWS KMS Decrypt operation for you, and the user needskms:Decrypt. Leave the flag out and the value comes back encrypted. - Each
get-secret-valuecall produces a CloudTrail log entry from Secrets Manager.
How to choose
- If the value is a credential that requires automatic rotation, follow the AWS recommendation and use Secrets Manager.
- If another account reads the value, a secret needs a resource policy and a KMS key that you create, and a parameter needs the advanced tier.
- If the value is plain configuration, start in the standard tier of Parameter Store, which is the default.
- Check the size. A parameter value stops at 8 KB, and a secret value can be up to 65,536 bytes.
Before you create a value, write down whether it rotates, which accounts read it and how large it is.
Sources
- What is AWS Secrets Manager?
- Rotate AWS Secrets Manager secrets
- Access AWS Secrets Manager secrets from a different account
- AWS Secrets Manager quotas
- Choosing parameter tiers in Parameter Store
- Assigning parameter policies in Parameter Store
- AWS KMS encryption for AWS Systems Manager Parameter Store SecureString parameters
- get-secret-value
Want a second pair of eyes on yours? We do this work for a living.
More guides

Dynamic database credentials with HashiCorp Vault
Secrets · 3 min read
Three steps to short-lived PostgreSQL users, plus leases, revocation and root rotation.

Azure Key Vault: access control, private access and rotation
Secrets · 4 min read
Azure RBAC roles, the firewall, private endpoints, purge protection and rotation for a key vault.

HashiCorp Vault: what to set up first
Secrets · 4 min read
Storage, seal, audit, auth, policies and KV version 2, in the order a new Vault server needs them.