A service exposes an API through API Gateway + Lambda. The Lambda function receives requests with an incoming Authorization header. Which configuration most directly ensures that only validated JWT claims are trusted by the Lambda without extra custom parsing?
Answer
Configure a JWT authorizer in API Gateway and pass validated claims to the Lambda via the request context.
Explanation
API Gateway JWT authorizers validate the token signature and claims before invocation. Lambda can then safely consume claims from the validated context rather than performing ad-hoc parsing.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A Lambda function processes S3 ObjectCreated events. You see occasional duplicate processing for the same key. The S3 bucket has versioning enabled. What is the best mitigation approach at the application level?
View question →
Service A exposes a REST API. It calls an internal service over HTTP and needs to handle intermittent upstream timeouts without masking downstream failures. It currently retries all errors including 4xx. In addition, requests must include a correlation ID for support. What change most improves correctness and debuggability?
View question →
In AWS AppSync, you enable fine-grained authorization with resolvers that call Lambda. To prevent privilege escalation from client arguments, what is the most robust security control?
View question →
A backend uses EventBridge to route events to multiple targets. You need to guarantee ordering for events with the same entity key while minimizing latency. Which design is most appropriate?
View question →
You deploy a CloudFront distribution with an origin at an S3 bucket. You need signed URLs and must also support caching efficiently while preventing content leaks. Which strategy best satisfies both goals?
View question →
A developer wants to use Step Functions to orchestrate a workflow with compensation. They must handle retries with jitter and avoid duplicating side effects when activities are retried. What is the best practice?
View question →