nerdexam
Amazon

DVA-C02 · Question #117

A social media application uses the AWS SDK for JavaScript on the frontend to get user credentials from AWS Security Token Service (AWS STS). The application stores its assets in an Amazon S3 bucket.

The correct answer is A. Add a Lambda@Edge function to the distribution. Invoke the function on viewer request. Add. Lambda@Edge is a good fit for the following scenarios: Functions that take several milliseconds or more to complete. Functions that require adjustable CPU or memory. Functions that depend on third-party libraries (including the AWS SDK, for integration with other

Submitted by packet_pusher· Mar 5, 2026Security

Question

A social media application uses the AWS SDK for JavaScript on the frontend to get user credentials from AWS Security Token Service (AWS STS). The application stores its assets in an Amazon S3 bucket. The application serves its content by using an Amazon CloudFront distribution with the origin set to the S3 bucket. The credentials for the role that the application assumes to make the SDK calls are stored in plaintext in a JSON file within the application code. The developer needs to implement a solution that will allow the application to get user credentials without having any credentials hardcoded in the application code. Which solution will meet these requirements?

Options

  • AAdd a Lambda@Edge function to the distribution. Invoke the function on viewer request. Add
  • BAdd a CloudFront function to the distribution. Invoke the function on viewer request. Add
  • CAdd a Lambda@Edge function to the distribution. Invoke the function on viewer request. Move
  • DAdd a CloudFront function to the distribution. Invoke the function on viewer request. Move the

How the community answered

(46 responses)
  • A
    59% (27)
  • B
    22% (10)
  • C
    7% (3)
  • D
    13% (6)

Explanation

Lambda@Edge is a good fit for the following scenarios: Functions that take several milliseconds or more to complete. Functions that require adjustable CPU or memory. Functions that depend on third-party libraries (including the AWS SDK, for integration with other

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice