Demonstrates some functionality of Vapor and how it can drop into an AWS Lambda & API Gateway environment.
Uses the following:
Swift
Vapor
vapor-aws-lambda-runtime
Sources/RunLocal
Runs vapor app locally without lambda or api gateway runtime.
Launch xcode, run the RunLocal app
Sources/RunLambda
Builds vapor app and injects the lambda runtime into the app specifically looking for the invocations from api gateway.
- Run
$ ./deploy/build.sh - Upload
.build/lambda/RunLambda/lambda.zipto AWS Lambda
This vapor app is designed to run with a lightweight HTTP API gateway with a single root path /v1 where all subsequent routes are handled by the vapor routing library.