Automated Credential Rotation with AWS Secrets Manager

DEA-C01 By islever Editorial Last updated

Short answer

B Use IAM policies for access, SSE-KMS for encryption, and AWS Secrets Manager for automatic credential rotation.

Question

A company needs a solution that restricts access to Amazon S3 data and encrypts the data by using AWS managed keys. The solution must manage database credentials that an AWS Lambda function uses and must rotate the credentials automatically.
Which solution will meet these requirements?
  1. Use S3 bucket policies to control access. Use server-side encryption with Amazon S3 managed keys (SSE-S3) to encrypt the data. Store the database credentials as Lambda environment variables.
  2. Use IAM policies to control access. Use server-side encryption with AWS KMS keys (SSE-KMS) to encrypt the data. Configure AWS Secrets Manager to store and automatically rotate the credentials by using a Lambda function. Correct Answer
  3. Use S3 ACLs to control access. Use server-side encryption with AWS KMS keys (SSE-KMS) to encrypt the data. Store the credentials in AWS Systems Manager Parameter Store and automatically rotate the credentials by using a Lambda function.
  4. Use IAM policies to control access. Use server-side encryption with Amazon S3 managed keys (SSE-S3) to encrypt the data. Store the credentials in AWS Systems Manager Parameter Store. Configure a scheduled Lambda function to rotate the credentials.

Key Takeaways

The main trap is confusing AWS Systems Manager Parameter Store with AWS Secrets Manager; only Secrets Manager offers native, easy-to-configure automatic rotation for secrets.

This question tests knowledge of AWS security services for S3 encryption and Lambda credential management. The correct solution uses AWS Secrets Manager for automatic rotation.

Common mistake: Candidates often choose Parameter Store (Option D) because it is cheaper, but failing to recognize its lack of native automatic rotation leads to an incorrect answer.

Expert Analysis

The scenario requires three specific capabilities: restricting access to Amazon S3, encrypting data with AWS managed keys, and automatically rotating database credentials for an AWS Lambda function.

First, regarding encryption, the requirement specifies 'AWS managed keys'. In AWS terminology, this refers specifically to keys owned and managed by AWS services. Amazon S3 managed keys (SSE-S3) use keys that are fully managed by Amazon S3. While AWS KMS has a mode called 'AWS managed key' (distinct from 'Customer managed'), SSE-KMS generally implies using a Customer Managed Key (CMK) or introduces unnecessary complexity for simple S3 encryption when SSE-S3 is available and sufficient. More importantly, many certification questions distinguish between 'AWS managed' (SSE-S3 or S3-managed KMS alias) and 'Customer managed' (CMK). However, the most critical differentiator lies in the credential management.

Second, for credential rotation, AWS Secrets Manager is the native service designed specifically for storing secrets and provides built-in, out-of-the-box automatic rotation capabilities. You configure a rotation schedule within Secrets Manager, which triggers a Lambda function you define. This meets the requirement of automatic rotation seamlessly.

Third, for access control, IAM policies are the recommended best practice for controlling access to AWS resources, including S3 buckets accessed by Lambda functions. While S3 bucket policies can also restrict access, IAM policies are more granular and standard for identity-based access control for Lambda execution roles.

Option B correctly combines IAM policies for access, SSE-KMS (which can utilize AWS managed keys if not explicitly creating a CMK, though SSE-S3 is simpler), and crucially, uses AWS Secrets Manager for automated credential rotation. Option D uses Parameter Store, which does not have native automatic rotation; it requires manual implementation via scheduled Lambda functions, which is less robust than Secrets Manager's native feature. Option A stores credentials in environment variables, which cannot be rotated automatically without redeploying code. Option C uses ACLs (outdated/less secure) and Parameter Store (no native auto-rotation).

Therefore, Option B is the best fit because AWS Secrets Manager is the primary service for automated secret rotation.

Official Reference

Exam Strategy

When a question mentions 'automatic rotation' of passwords or API keys, immediately look for AWS Secrets Manager. If the option suggests using Parameter Store with a custom Lambda function, it is likely a distractor unless Secrets Manager is unavailable or cost is the primary constraint. Always pair IAM policies with modern AWS services for least-privilege access.

Frequently Asked Questions

What is the difference between SSE-S3 and SSE-KMS?

SSE-S3 uses keys fully managed by Amazon S3 with no customer involvement. SSE-KMS uses AWS Key Management Service, allowing for more control over key usage policies and audit logs, even when using AWS managed keys.

Can I rotate credentials automatically with Parameter Store?

No, AWS Systems Manager Parameter Store does not support automatic rotation natively. You must build and manage your own Lambda function to handle the rotation logic.

More DEA-C01 FAQ →

Community Votes

B
67%
D
33%

67% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. 9f871d2 👍 2 Answered B
    Option B is correct
  2. AWS82siast 👍 1 Answered D
    B doesn't meet AWS managed Key requirements. SSE-KMS is customer managed. But Parameter Store requires scheduled lambda.
  3. AWS82siast 👍 1 Answered B
    B is correct, SSE-KMS with AWS managed is possible.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All DEA-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DEA-C01 Practice Test →

← Back to DEA-C01 Study Guide