A company is implementing an application on Amazon EC2 instances. The application needs to process incoming transactions. When the application detects a transaction that is not valid, the application must send a chat message to the company's support team. To send the message, the application needs to retrieve the access token to authenticate by using the chat API. A developer needs to implement a solution to store the access token. The access token must be encrypted at rest and in transit. The access token must also be accessible from other AWS accounts. Which solution will meet these requirements with the LEAST management overhead?
Show Answer & Explanation
Correct Answer: C. Use AWS Secrets Manager with an AWS Key Management Service (AWS KMS) customer managed key to store the access token. Add a resource-based policy to the secret to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Secrets Manager. Retrieve the token from Secrets Manager. Use the decrypted access token to send the message to the chat.
AWS Secrets Manager is the ideal solution for storing sensitive credentials like API access tokens. It provides automatic encryption at rest and in transit, supports resource-based policies for cross-account access, and handles decryption automatically when retrieving secrets. While Parameter Store SecureString can also store encrypted values, Secrets Manager is specifically designed for credential management and offers built-in rotation capabilities. The other options (DynamoDB and S3) require more manual setup for encryption and decryption, resulting in higher management overhead.