A sample serverless app with Rust. I'm just experimenting stuff here so don't take anything at face value 🙃.
Current features:
- ✅ Synchronous lambdas
- ✅ Asynchronous lambdas
- ✅ IAC unit tests
- 🕑 Lambda unit tests
- ✅ Integration tests
- ✅ Preview environments
- ❌ Frontend
A very simple todo API to create, retrieve and delete todos. No front for now.
This is the architecture schema:
NodeJS: See official NodeJS install docs. The current NodeJS version is stored in .nvmrc. If you use nvm, you can run:
nvm usePnpm: dependency manager. Install with:
npm install -g pnpmRust toolchain: the Rust version is pinned in rust-toolchain.toml. Follow the official install instructions.
Cargo Lambda: in order to cross-compile Rust code to Lambda runtime. Follow install instructions.
Install NodeJS dependencies:
pnpm installIn order to deploy, you will need an AWS account. If you don't have one, refer to the AWS documentation.
Then install the AWS CLI: install docs.
Setup a local profile:
aws configure --profile <your-profile-name>pnpm buildpnpm test⚠ Warning: you may have to log in to your AWS profile again, depending on the setup method.
pnpm run deploy --profile <your-profile-name>pnpm test-integration