考题解析 | 使用 AWS Secrets Manager 自动轮换凭证


  题目

A company performs monthly maintenance on its AWS infrastructure. During these maintenance activities, the company needs to rotate the credentials for its Amazon RDS for MySQL databases across multiple AWS Regions.
Which solution will meet these requirements with the LEAST operational overhead?
A. Store the credentials as secrets in AWS Secrets Manager. Use multi-Region secret replication for the required Regions. Configure Secrets Manager to rotate the secrets on a schedule.
B. Store the credentials as secrets in AWS Systems Manager by creating a secure string parameter. Use multi-Region secret replication for the required Regions. Configure Systems Manager to rotate the secrets on a schedule.
C. Store the credentials in an Amazon S3 bucket that has server-side encryption (SSE) enabled. Use Amazon EventBridge (Amazon CloudWatch Events) to invoke an AWS Lambda function to rotate the credentials.
D. Encrypt the credentials as secrets by using AWS Key Management Service (AWS KMS) multi-Region customer managed keys. Store the secrets in an Amazon DynamoDB global table. Use an AWS Lambda function to retrieve the secrets from DynamoDB. Use the RDS API to rotate the secrets.

  参考答案

A

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
某公司需要在多个AWS区域中为其Amazon RDS for MySQL数据库定期轮换凭证。需要一个最低操作开销的解决方案。

A. 正确。将凭证作为秘密存储在AWS Secrets Manager中。使用所需区域的多区域秘密复制。配置Secrets Manager按计划轮换秘密。AWS Secrets Manager 专门设计用于管理、检索和轮换数据库凭证等秘密。它支持多区域秘密复制,可以在多个 AWS 区域中自动复制和管理秘密。配置按计划自动旋转秘密可以大大减少手动操作的需要,从而降低操作开销。
B. 不正确。将凭证作为秘密存储在 AWS Systems Manager 中,通过创建安全字符串参数。使用所需区域的多区域秘密复制。配置Systems Manager按计划轮换秘密。AWS Systems Manager Parameter Store 也可以用于存储和管理秘密,但它不像 Secrets Manager 那样专门用于秘密管理,本身不直接支持按计划自动旋转秘密,且多区域复制需要额外的配置和管理。
C. 不正确。将凭证存储在启用了服务器端加密(SSE)的Amazon S3存储桶中。使用Amazon EventBridge(Amazon CloudWatch Events)调用AWS Lambda函数来轮换凭证。该方案实现复杂,维护成本高,偏离了 AWS 最佳实践。
D. 不正确。使用 AWS Key Management Service(AWS KMS)多区域客户管理的密钥加密凭证作为秘密。将秘密存储在 Amazon DynamoDB 全局表中。使用 AWS Lambda 函数从 DynamoDB 检索秘密。使用RDS API轮换秘密。该方案需要使用多个 AWS 服务(KMS、DynamoDB、Lambda、RDS API),需要复杂的配置和集成。DynamoDB 全局表提供了跨区域的数据复制,但使用它来存储和管理凭证并不是最直接或最高效的方法。此外,实现凭证的旋转需要编写和维护Lambda函数,以及调用RDS API,增加了操作的复杂性和开销。