A developer is building a serverless orchestration workflow using AWS Step Functions. One of the workflow's task states invokes an AWS Lambda function that integrates with a third-party merchant API. The merchant API requires a secure API key for authentication. The company's security policy requires that this API key be rotated every 30 days. Which solution meets these requirements with the least operational overhead?
- Store the API key in AWS Secrets Manager. Configure automatic rotation for the secret on a 30-day schedule using a rotation Lambda function, and configure the integration Lambda function to retrieve the secret at runtime.Answer
- BStore the API key as a SecureString parameter in AWS Systems Manager Parameter Store. Create an Amazon EventBridge rule that runs a custom Lambda function every 30 days to generate a new key and update the parameter value.
- CStore the API key as an encrypted environment variable in the integration Lambda function's configuration using AWS Key Management Service (AWS KMS). Implement a custom helper function inside the application code to handle rotation.
- DStore the API key as a Standard parameter in AWS Systems Manager Parameter Store. Enable the native Parameter Store automatic rotation feature and configure it for a 30-day rotation interval.
Answer
Store the API key in AWS Secrets Manager. Configure automatic rotation for the secret on a 30-day schedule using a rotation Lambda function, and configure the integration Lambda function to retrieve the secret at runtime.
The correct option is to use AWS Secrets Manager with its built-in automatic rotation feature, configured with a rotation Lambda function on a 30-day schedule. AWS Secrets Manager is specifically designed for managing, rotating, and retrieving secrets securely at runtime, which satisfies the requirements with the lowest operational overhead.
Step-by-Step Solution
Key Concept
Secrets Manager vs Systems Manager Parameter Store Rotation Capabilities
Estimated Time:1m 30s