Serverless Golang REST API hosted on AWS Lambda.
- Go 1.18
- Docker
- AWS CDK
- Golang Echo REST server running on API Gateway backed by an AWS Lambda proxy integration
- Schema-first, code-generation using oapi-codegen
- Adapts AWS Lambda Proxy response to Go Echo server request
- Starts server in Lambda global context on Cold Start for reuse between invocations
- OpenAPI spec validation in CI with swagger-cli
- Auth - add BYO auth handling inside Echo server
- Doesn't build an API Gateway from the OpenAPI spec, for example with a SpecRestAPI.
Launch a development server with Docker:
docker-compose up
Run unit tests:
make test
Validate OpenAPI spec with:
make validate
export AWS_PROFILE=<YOUR_PROFILE_NAME>
make deploy