MLA-C01 practice question 5 of 10

A company has an application that uses different APIs to generate embeddings for input text. The company needs to implement a solution to automatically rotate the API tokens every 3 months. Which solution will meet this requirement?

Full set: 259 questions
Answer options
A: Store the tokens in AWS Secrets Manager. Create an AWS Lambda function to perform the rotation. Correct answer
B: Store the tokens in AWS Systems Manager Parameter Store. Create an AWS Lambda function to perform the rotation.
C: Store the tokens in AWS Key Management Service (AWS KMS). Use an AWS managed key to perform the rotation.
D: Store the tokens in AWS Key Management Service (AWS KMS). Use an AWS owned key to perform the rotation.
Correct Answer:
A. Store the tokens in AWS Secrets Manager. Create an AWS Lambda function to perform the rotation.
Explanation

AWS Secrets Manager is the purpose-built AWS service for managing the lifecycle of secrets, including API tokens. It provides a native framework for automatic rotation. For secrets that AWS cannot rotate natively, such as third-party API tokens, Secrets Manager integrates directly with AWS Lambda. You can configure Secrets Manager to invoke a specific Lambda function on a schedule (e.g., every 90 days) to handle the custom logic required to connect to the third-party API, generate a new token, and update the secret value in Secrets Manager.

Why Incorrect

B: While AWS Systems Manager Parameter Store can store secrets, it lacks the built-in, managed rotation framework that Secrets Manager offers, making it a less direct and less capable solution for this specific requirement. C: AWS Key Management Service (AWS KMS) is used to create and manage cryptographic keys for encryption, not to store or rotate application-level secrets like API tokens. D: Similar to option C, AWS KMS manages encryption keys. The key type (AWS owned vs. AWS managed) is irrelevant as the service's fundamental purpose is not secret storage or rotation.

References

1. AWS Secrets Manager Documentation: "For other types of secrets

including API keys... you can create a Lambda function to define how Secrets Manager rotates the secret. This is called a custom rotation strategy."

Source: AWS Secrets Manager User Guide

"Rotate AWS Secrets Manager secrets".

2. AWS Lambda and Secrets Manager Integration: "Secrets Manager uses a Lambda function to rotate a secret... Secrets Manager calls your Lambda function at least twice during a rotation."

Source: AWS Secrets Manager User Guide

"How rotation works".

3. AWS KMS Service Definition: "AWS Key Management Service (AWS KMS) is a managed service that makes it easy for you to create and control the cryptographic keys that you use to protect your data."

Source: AWS Key Management Service Developer Guide

"What is AWS Key Management Service?".

Scroll to Top