AWS Certified Developer – Associate (DVA-C02) — Question 153

A company is using Amazon OpenSearch Service to implement an audit monitoring system. A developer needs to create an AWS CloudFormation custom resource that is associated with an AWS Lambda function to configure the OpenSearch Service domain. The Lambda function must access the OpenSearch Service domain by using OpenSearch Service internal master user credentials.

What is the MOST secure way to pass these credentials to the Lambda function?

Answer options

Correct answer: D

Explanation

The correct answer is D because using AWS Secrets Manager provides a secure method to manage and access sensitive information, such as credentials, while allowing fine-grained access control through IAM roles. Options A and C expose the credentials either directly or through environment variables, which is less secure. Option B, while safer than A and C, still requires managing credentials in Systems Manager, which is not as robust as using Secrets Manager.