Example REST API built on lambda, using golang with the gin framework.
Part of the service declaration is provisioning a DynamoDB table and updating the lambda execution role with permissions for access.
The entry-point handler is configured to run locally based on the value of GIN_MODE
in the environment. If GIN_MODE
is set to release
, it is assumed that the application is being executed in lambda. Otherwise, a local http server will be started on port 3000
.
A realize configuration is also provided.
To run locally:
realize start
Full deployment:
make deploy
Quick deploy of handler function:
make deploy-quick
MIT. See LICENSE.