AWS Certified Solutions Architect – Associate
Secrets Manager vs Parameter Store: rotation, cost and limits
Use Secrets Manager for credentials and other secrets that need automatic rotation, replication to other Regions or cross-account access. It is billed per secret per month and per API call. Use Parameter Store for configuration such as endpoint URLs and AMI IDs. It has no credential rotation, and its standard tier has no additional charge.
What each one is for
AWS positions Parameter Store for static configuration and key-value data: approved AMI IDs, environment variables, endpoint URLs, resource identifiers and tuning values. Secrets Manager is for database credentials, API keys, OAuth tokens and other secrets that need rotation, cross-account access or detailed audit logging.
Parameter Store has three types. String is plain text. StringList is a comma-separated list, such as subnet-123abc,subnet-456def. SecureString is encrypted with AWS KMS. Even for SecureString, AWS recommends Secrets Manager for credentials, because Parameter Store has no rotation.
Parameter Store tiers
Standard is the default. It allows 10,000 parameters per account and Region, values up to 4 KB, no parameter policies, no sharing with other accounts, and no additional charge.
Advanced allows 100,000 parameters, values up to 8 KB, parameter policies such as expiration and expiration notifications, and sharing with other accounts. It is charged. You can change a standard parameter to advanced, but not back. To return to standard, delete the parameter and create it again.
Parameter Store keeps the last 100 versions of each parameter and supports hierarchies such as /dev/webserver/linux/approved-ami.
Secrets Manager rotation and replication
Secrets Manager rotates in two main ways. Managed rotation needs no Lambda function, and is offered by Amazon RDS, Aurora and DocumentDB for master user credentials and by Amazon Redshift for admin passwords. Other secrets rotate with a Lambda function, which is billed at Lambda rates. A rotation schedule can be as frequent as every four hours.
You can replicate a secret to other Regions so applications there read it locally. The replica's ARN matches the primary except for the Region. When rotation is on for the primary, the new value propagates to every replica, so you do not configure rotation on each replica. A replica can use a KMS key in its own Region.
Cross-account access to a secret
Reading a secret from another account needs three things: a resource policy on the secret that allows the caller, a key policy statement on the secret's KMS key that allows kms:Decrypt, and an identity policy in the caller's account that allows secretsmanager:GetSecretValue and kms:Decrypt.
The AWS managed key aws/secretsmanager cannot be used for cross-account access. The secret must be encrypted with a customer managed key that you create.
Where the exam catches people
- Believing a
SecureStringparameter rotates itself: Parameter Store has no credential rotation. - Believing a secret encrypted with
aws/secretsmanagercan be shared with another account: cross-account access needs a customer managed KMS key. - Believing each replica secret needs its own rotation: rotation runs on the primary and the new value propagates to the replicas.
- Believing every Secrets Manager rotation needs a Lambda function you write: managed rotation covers RDS, Aurora and DocumentDB master user credentials and Redshift admin passwords.
- Believing an advanced parameter can be moved back to standard: it cannot, and you must delete and recreate it.