A developer is troubleshooting an application where an Amazon API Gateway REST API is secured using a custom Lambda authorizer. The authorizer validates a JSON Web Token (JWT) in the request header and returns an IAM policy. The Lambda authorizer has caching enabled with a Time to Live (TTL) of seconds, using the client's `Authorization` header as the cache key.
A client application makes a request to `GET /orders/1` with a valid token and successfully retrieves the resource. Immediately afterward, the same client sends a request to `POST /orders` using the same token. The client receives a HTTP 403 Forbidden response with the message `{"message":"User is not authorized to access this resource"}`. The CloudWatch logs show that the Lambda authorizer was not invoked for the second request.
Which of the following actions should the developer take to resolve this authorization failure? (Select TWO.)
- Update the Lambda authorizer function to return an IAM policy that specifies a wildcard in the resource path (e.g., `arn:aws:execute-api:region:account:apiId/stage/*`) to cover all methods and resources the client is permitted to access.Cevap
- Disable authorization caching by setting the TTL to seconds in the API Gateway console for the Lambda authorizer.Cevap
- CReplace the Lambda authorizer with an API Gateway Cognito User Pool authorizer and pass the same JWT token in the `Authorization` header.
- DUpdate the trust relationship of the Lambda function's execution role to allow the `apigateway.amazonaws.com` service principal to assume the role.
- EConfigure the API Gateway API method authorization to require Cognito Identity Pool credentials, and update the client application to sign requests using AWS Signature Version 4.