OAuth2 Token Introspection vs JWT Validation on Cognito and API Gateway
Quick summary: Local JWT validation is fast until revocation lags bite you. When to introspect at Cognito, use API Gateway JWT authorizers, and add Verified Permissions for fine-grained authz.
Key Takeaways
- When to introspect at Cognito, use API Gateway JWT authorizers, and add Verified Permissions for fine-grained authz
- Amazon Cognito (June 2026) issues JWT access tokens—validate locally with JWKS ( ) for latency
- Introspection (RFC 7662) hits the authorization server each request—slower but immediate revocation awareness if the AS supports it
- AWS wiring - HTTP API JWT authorizer — , from Cognito pool - Lambda authorizer — custom claims, Cedar via Verified Permissions - mTLS — separate track for B2B What to do this week 1
- Enable Cognito token revocation API where required
Table of Contents
Amazon Cognito (June 2026) issues JWT access tokens—validate locally with JWKS (/.well-known/jwks.json) for latency. Introspection (RFC 7662) hits the authorization server each request—slower but immediate revocation awareness if the AS supports it.
Decision matrix
| Approach | Latency | Revocation |
|---|---|---|
| JWT local validate | Low | Until expiry (unless short TTL + refresh) |
| Introspection | Higher | Real-time if AS honors active: false |
| API Gateway JWT authorizer | Edge validation | Cognito token lifetime |
Opinionated take: Short-lived access tokens (5–15 min) + local JWKS validation for APIs; introspection for high-risk admin actions only.
AWS wiring
- HTTP API JWT authorizer —
issuer,audiencefrom Cognito pool - Lambda authorizer — custom claims, Cedar via Verified Permissions
- mTLS — separate track for B2B
What to do this week
- Enable Cognito token revocation API where required.
- Cache JWKS with kid rotation handling.
- Map scopes to IAM-style policies in Verified Permissions for new services.
What this guide doesn’t cover
Rate limiting—part 2 of API track.
AWS Cloud Architect & AI Expert
AWS-certified cloud architect and AI expert with deep expertise in cloud migrations, cost optimization, and generative AI on AWS.