ExamQuestions.com

Register
Login
AWS Certified Security Specialty Exam Questions

Amazon

AWS Certified Security Specialty

263 / 310

Question 263:

A team is developing a RESTful API for the annual leave data. It should be used internally by employees. An AWS API Gateway implements the API with the Lambda function.
You want to control access to the RESTful API, and the incoming HTTP requests should include a valid token. If the token is invalid, a 401 Unauthorized response will be returned.
How would you configure the authorization for the API?

Answer options:

A.In the existing Lambda function, add an authorization logic to check the custom token header. Return a 401 Unauthorized response if the token header is invalid.
B.Create an authorizer for the API gateway using a new Lambda function. Implement the logic to validate the token in the new Lambda function.
C.Configure an IAM policy in the API gateway. Use the Principal field to determine which users are allowed to send requests to the API.
D.Configure a SAML authorizer using an AWS Cognito user pool and the token header is checked by Cognito. The API call proceeds only if the required token is valid.