AWS HTTP API Gateway Framework
AWS API Gateway - HTTP API Framework -- Also called API Gateway v2.
A framework to easily implement HTTP APIs in AWS API Gateway. Implement CRUD operations in less than 100 lines of code!
Test a working demo for your own with this repo.
Docs
The framework complete docs can be found here.
Quick start
- Install via npm
npm i aws-http-api-gateway
- Setup your serverless function
# serverless.ymlservice: name: PetStoreprovider: name: aws runtime: nodejs12.xfunctions: PetsGetManyApi: handler: src/apis/pets/get-many.handler events: - httpApi: 'GET /pets'
- Code your handler
// src/apis/pets/get-many.js'use strict'; const GetManyApi ApiHandler = ; const PetConnector = ; const petConnector = ; { return petConnector; } ; moduleexportshandler = ;
- Code your data connector (implement with your favorite database)
'use strict'; const dbHandler = ; moduleexports = { return dbHandler; } ;
- You're ready to go. Just deploy your service!
serverless deploy