RFC: Event Hander - Api Gateway Support · Issue #413 · aws-powertools/powertools-lambda-typescript (original) (raw)

Important

The RFC for this feature has concluded (#3500), a big thank you to everyone who took the time to read and engage with it. You can follow the progress of the implementation in this milestone and here (#3251).


Description of the feature request

Event Handler Support for powertools-typescript, to handle API Gateway events & Appsync events

Problem statement

Lambda Powertools for python is a one-stop-shop for all variants of lambda we develop today : api-driven, event-driven, etc. Event Handler helps with that. This way, we don't have to introduce other framework/library to handle api-gateway, appsync, etc.

Summary

Event Handler Support for powertools-typescript eventHandler, to handle API Gateway events

Motivation

There are Nodejs routing frameworks in Typescript & Javascript - expressjs, koa, nestjs, fastify are very opinionated to their ecosystem and also have a heavy-foot print for serverless workloads. We need a light-weight routing library that is part of the powertools ecosystem for Typescript similar to the Powertools-Python

Proposal

Create a new package event-handler and start with API Gateway Proxy Event Handler and potentially add more features like - AppSync, ALB and Lambda Function URL. The package should be light-weight only dependent on Powertools Core libraries and not introduce any external packages

UX should support:

#413 (comment)

Code examples
https://awslabs.github.io/aws-lambda-powertools-python/latest/core/event_handler/api_gateway/

Benefits for you and the wider AWS community

Describe alternatives you've considered

#1166