AWS Certified Developer – Associate — Question 27

A front-end web application is using Amazon Cognito user pools to handle the user authentication flow. A developer is integrating Amazon DynamoDB into the application using the AWS SDK for JavaScript.
How would the developer securely call the API without exposing the access or secret keys?

Answer options

Correct answer: A

Explanation

The correct answer is A because configuring Amazon Cognito identity pools allows the application to obtain temporary credentials, enhancing security by not exposing access or secret keys. Option B is less secure since it relies on EC2 instance profiles without necessary token management. Option C is fundamentally insecure as hardcoding credentials is not a best practice. Option D does not provide a secure method for obtaining temporary credentials needed to access DynamoDB.