Secrets Manager stores encrypted credentials outside application code. These sections explain how applications retrieve versions, how rotation updates the target credential, and how replication and policies support regional and account boundaries.
Managed and Lambda rotation
Secret rotation periodically changes a credential in both Secrets Manager and its database or service. Treat the stored value and the credential accepted by the target as a pair that must stay in sync.
How it works
-
Choose the rotation path supported by the secret.
Path Who performs the update Lambda function Managed rotation A supporting AWS service, such as RDS or Aurora for master credentials Not used Managed external secrets rotation Secrets Manager updates a secret held by a supported partner Not used Lambda rotation A configured function updates the secret and target Required -
For Lambda database rotation, choose a strategy. Single user changes one user’s password. Alternating users switches between an original and cloned user, with a separate privileged secret to create the clone. Both credentials remain valid after alternating-users rotation.
-
For a CloudFormation database secret, use AWS::SecretsManager::SecretTargetAttachment to add the connection information needed for rotation to the secret JSONJSON represents structured secret data as named key-value pairs..
Managed external secrets launched in November 2025.
Exam cues
- If the question says supported database master credentials with no custom function, think managed rotation, because the database service manages the updates.
- If the question says a custom service password must change with its stored value, think Lambda rotation, because the function can update the secret and target system.
- If the question says credentials must stay usable during rotation, think alternating users, because the current user stays valid while the other user’s password changes.
- If the question says expire or notify about an old Parameter Store value, think parameter policies, because those actions do not change a database password.
- If the question says a database secret lacks connection information for rotation, think SecretTargetAttachment, because it adds those fields to the secret JSON.
Remember
- Single-user rotation keeps open database connections but can briefly affect new authentication.
- Alternating users requires a separate privileged secret for cloning.
- Managed rotation for supported services and managed external secrets rotation do not require a Lambda function.
Trap: Saving a new password value is only one part of rotation. The target credential must also be updated.
Create the pending version before changing the target.
Apply the pending credential before testing it.
Promote the tested version and retain AWSPREVIOUS.
Allow pending and current header values in the WAF rule.
Update the CloudFront custom origin header while both values remain accepted.
Test both header values against the ALB before promoting the new secret version.
Da documentação da AWS (12)
- Secrets Manager credential rotation updates both the stored secret and the database or service credential.
- Managed rotation lets a supporting service configure and manage secret rotation without a Lambda rotation function.
- RDS and Aurora support managed rotation for their master user credentials.
- Secrets Manager managed external secrets can rotate secrets held by supported partners without a Lambda function.
- Other Secrets Manager secrets can use a Lambda rotation function, with a custom function when no suitable template exists.
- Single-user database rotation changes one user password; existing open connections remain, but new authentication can fail briefly between the database update and secret promotion.
- Alternating-users rotation switches between an original and cloned database user, using a separate privileged secret to clone the user; both credentials remain valid after rotation.
- Parameter Store advanced parameter policies are Expiration, ExpirationNotification, and NoChangeNotification; they delete or notify rather than rotate database credentials.
- Secrets Manager managed external secrets launched in November 2025.
- CloudFormation AWS::SecretsManager::SecretTargetAttachment adds the target database connection information to the secret JSON required for database rotation.
- The documented origin-header rotation tests both AWSPENDING and AWSCURRENT header values against the ALB before finishSecret.
- A CloudFront origin is the backend from which the distribution retrieves content.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 6 flashcards em lista
A database password must rotate automatically with its Secrets Manager value and database kept in sync. Which rotation service fits?
Secrets Manager. Use the database service's managed rotation when supported or configure a Lambda rotation function.
Which Secrets Manager rotation paths use Lambda, and which do not?
Managed rotation for supporting AWS services and managed external secrets rotation do not use Lambda. Other secret types can use a configured Lambda rotation function.
Can Parameter Store Expiration or NoChangeNotification policies replace Secrets Manager automatic rotation for a database password?
No. They delete a parameter or issue a notification. Use Secrets Manager automatic rotation to update both the credential store and database.
An application needs database credentials that stay valid while Secrets Manager rotates them. Which Lambda strategy fits?
Alternating users. It switches between an original and cloned user and requires a separate privileged secret for cloning.
A supported RDS master credential in Secrets Manager should rotate without maintaining a Lambda function. Which rotation path fits?
Managed rotation configured through the supporting database service.
A CloudFormation database secret lacks host and connection fields needed for rotation. Which resource fills them in?
AWS::SecretsManager::SecretTargetAttachment adds the database connection information to the secret JSON.