A developer wants AWS Secrets Manager to automatically rotate database credentials every 30 days. Which mechanism enables this automatic rotation?
Think about how AWS Secrets Manager can run code to update credentials without manual intervention.
AWS Secrets Manager uses Lambda functions to perform automatic rotation. You link a Lambda rotation function to the secret, and Secrets Manager runs it on the schedule you set to update credentials securely.
You want to allow an application to read only one secret named prod/db-password from AWS Secrets Manager. Which IAM policy snippet grants the least privilege?
Least privilege means only needed actions on only the specific secret.
Option D allows only the necessary actions to read and describe the specific secret resource. Other options are either too broad or allow all actions.
You have multiple microservices running on AWS ECS that need access to different secrets stored in AWS Secrets Manager. What is the best architecture to securely provide each microservice access only to its required secrets?
Think about isolating permissions per microservice to follow security best practices.
Assigning one IAM role per microservice with scoped permissions ensures each service can only access its own secrets, reducing risk if one service is compromised.
You want to retrieve the plaintext value of a secret named prod/api-key using AWS CLI. Which command will return only the secret string?
Focus on extracting only the secret string, not metadata.
The command in option C uses --query to extract only the SecretString field and outputs it as plain text, which is the secret value.
Your company uses multiple AWS accounts for development, testing, and production. You want to centralize secret management in one account but allow secure read access to secrets from other accounts. What is the best practice to achieve this?
Think about how AWS Secrets Manager supports cross-account access securely.
Resource-based policies on secrets allow you to grant cross-account access securely without duplicating secrets or sharing credentials. This is the recommended best practice.