Secrets Manager and Parameter Store
Configuration versus credentials
Parameter Store organizes configuration in named paths and supports String, StringList and SecureString. SecureString uses KMS encryption; it is not automatically a credential rotation system. Secrets Manager is designed for sensitive credentials and supports rotation and regional replication for supported workflows. For a reports API, store a non-sensitive page size as a String parameter, and choose Secrets Manager for a database credential requiring managed rotation. Prefer short-lived workload identity when available instead of storing an AWS access key.
Retrieve without exposing values
Give the application role access only to the required secret ARN or parameter path and necessary KMS permissions. Retrieve through the SDK over TLS, keep values in memory only as needed and avoid writing them to source, shell history, logs or diagnostic responses. Cache carefully to balance availability, API cost and stale credentials. A cache needs a bounded lifetime and a controlled refresh strategy after authentication failure; retries must be limited. For example, log a synthetic secret version identifier and success status, never the secret value. Review path permissions and cross-account resource and key policies before sharing.
Rotate the credential, not just its stored value
For a supported Lambda rotation workflow, create the pending version, set the credential on the target, test it against the target, and finish by promoting the tested version to AWSCURRENT. A managed rotation integration may handle this without your Lambda function. Changing a stored password alone does not change the database password. Failed tests must not promote the pending version; a target update may already have occurred, so investigate target state and reconcile it using an approved recovery plan. Previous version labels do not guarantee that the old credential still works. Plan client refresh, monitoring and limited retries.
Compare operating costs and failure modes
Standard Parameter Store parameters can have no additional parameter storage charge; advanced parameters and higher throughput can incur charges. Secrets Manager charges depend on stored secrets and calls; customer managed KMS keys, rotation compute and networking can add cost. Check current regional pricing before estimating. If retrieval fails, distinguish missing authorization, inaccessible KMS key, network failure and stale cached versions. Do not solve an access error by making a secret public. Practice: classify page size, a rotating database credential and a short-lived AWS role session; explain why these are three different storage or identity decisions.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Secrets Manager and Parameter Store — knowledge check
Reason about synthetic encryption and credential lifecycle cases.
Which is a reasonable home for a rotating database password?
What does SecureString provide?
What should a diagnostic log contain?
A pending credential fails the target test. What is appropriate?
What is a risk of an unbounded credential cache?