This project explores building an AWS Lambda function with the Rust custom runtime.
- Rust development environment
- AWS Account
- Docker
- direnv
- Localstack
- awslocal Localstack CLI wrapper
For Mac OS, make sure you download and link the target and linker for the AWS Lambda Rust runtime:
make install-runtime-targetFirst, set an AWS_PROFILE environment variable in a .envrc file following the example in .envrc.example.
direnv allow .Install NPM dependencies for CDK infrastructure:
make install-cdk-depsMake sure your AWS account is bootstrapped for CDK applications
make bootstrap-envDeploy CDK stacks to AWS form your local machine:
make build-release package-binary deploy
This project uses Localstack for local development. Localstack supports deploying and running AWS resources in a local Docker environment. To use Localstack run:
docker-compose up
# one-time bootstrap
make bootstrap-localstack
# deploy resources in Docker
make deploy-localstack
# check localstack services are running
curl -get http://localhost:4566/health
# call the deployed API in localstack
make call-local-api