Rust Serverless Lambda Template
This setting used by This Repository
Default Setting
- Rust
- lambda_http
- tokio
- serde_json
- Serverless
- serverless-rust
- dockerless
- default docker image's rust version is 1.43.1
- before 1.50 caused compile error
- Using husky
- pre-commit : cargo fmt
Should Required Settings
- Install aws cli
- setting
aws configure
- setting
- serverless-rust should setting
x86_64-unknown-linux-musl
- if you use
dockerless
option
- if you use
[ IMPORTANT ] Must Change Here
package.json
line 2 - project nameserverless.yml
line 1 - serviceserverless.yml
line 3 - providerserverless.yml
line 21 - functions
Usage
Install
npm ci && npm run postinstall && npm run fmt:install
Test
npm run test # cargo test
Deploy
npm run deploy:dev
npm run deploy:qa
npm run deploy:prod
Formatting
npm run fmt:install # install rustfmt
npm run fmt # formatting
npm run fmt:check # check lint