-
Copy and rename the file
.env.example
to.env
:Customize the values as necessary
-
Run the project API CLI:
docker compose run --rm aws-lambda-api bash
-
Install the dependencies:
yarn
-
Build the project to generate
.js
dist files:yarn build
-
Start the API locally:
docker compose up aws-lambda-api
-
Build the AWS Lambda Docker image and run the build project inside it
-
Build the Docker image:
docker compose build aws-lambda
-
Build the Docker image:
docker compose up aws-lambda
-
Test with a simple request:
curl \ -X POST \ -H 'Content-Type: application/json' \ -d '{ "name": "Lucas" }' \ http://localhost:3000/2015-03-31/functions/function/invocations
-