exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 239 discussion

A developer created a web API that receives requests by using an internet-facing Application Load Balancer (ALB) with an HTTPS listener. The developer configures an Amazon Cognito user pool and wants to ensure that every request to the API is authenticated through Amazon Cognito.

What should the developer do to meet this requirement?

  • A. Add a listener rule to the listener to return a fixed response if the Authorization header is missing. Set the fixed response to 401 Unauthorized.
  • B. Create an authentication action for the listener rules of the ALSet the rule action type to authenticate-cognito. Set the OnUnauthenticatedRequest field to “deny.”
  • C. Create an Amazon API Gateway API. Configure all API methods to be forwarded to the ALB endpoint. Create an authorizer of the COGNITO_USER_POOLS type. Configure every API method to use that authorizer.
  • D. Create a new target group that includes an AWS Lambda function target that validates the Authorization header by using Amazon Cognito. Associate the target group with the listener.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SerialiDr
Highly Voted 1 year, 4 months ago
Selected Answer: B
This approach uses the built-in capabilities of the ALB to authenticate requests with Amazon Cognito. By configuring a rule action to authenticate with a Cognito user pool, the ALB can handle authentication before the request is forwarded to the target group. The OnUnauthenticatedRequest setting of "deny" ensures that unauthenticated requests are not allowed access, which aligns with the requirement to authenticate every request.
upvoted 10 times
...
dostonbekabdullaev
Highly Voted 1 year, 4 months ago
Selected Answer: B
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html#configure-user-authentication
upvoted 6 times
...
preachr
Most Recent 8 months, 4 weeks ago
Selected Answer: B
OnUnauthenticatedRequest The behavior if the user is not authenticated. The following are possible values: deny - Return an HTTP 401 Unauthorized error. allow - Allow the request to be forwarded to the target. authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
upvoted 1 times
...
Anandesh
11 months, 1 week ago
Selected Answer: B
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_AuthenticateCognitoActionConfig.html
upvoted 1 times
...
tsangckl
1 year ago
This appear at 17 Jun exam
upvoted 1 times
...
65703c1
1 year ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
JohnPl
1 year, 5 months ago
Selected Answer: C
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-enable-cognito-user-pool.html
upvoted 1 times
...
rrshah83
1 year, 5 months ago
Selected Answer: B
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html#configure-user-authentication
upvoted 3 times
...
c9ebec2
1 year, 6 months ago
Selected Answer: C
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html
upvoted 2 times
...
TanTran04
1 year, 6 months ago
Selected Answer: B
https://www.examtopics.com/discussions/amazon/view/88889-exam-aws-certified-developer-associate-topic-1-question-332/
upvoted 3 times
...
Certified101
1 year, 6 months ago
Selected Answer: C
I think its C - API G would work better ?
upvoted 1 times
...
Claire_KMT
1 year, 7 months ago
B. Create an authentication action for the listener rules of the ALSet the rule action type to authenticate-cognito. Set the OnUnauthenticatedRequest field to “deny.”
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...