This is a simple example to test the performance of a simple HTTP router using AWS Lambda.
- Set LOCALSTACK_API_KEY to the env
echo LOCALSTACK_API_KEY=xxxxxxx >> .env
- Start the stack
make start
- Running the example for the first time
make init
make apply
- Refreshing the code after the first time
make refresh
- Destroying the example
make destroy
- Stopping the stack
make stop
The output from the make apply
command will show the URL of the API Gateway. Export this value to the API_URL
environment variable. Then use curl
to test the router.
export API_URL=http://{API_ID}.execute-api.localhost.localstack.cloud:4566
curl -X GET $API_URL
curl -X GET $API_URL/users
curl -X GET $API_URL/users/1
curl -X DELETE $API_URL/users/1