-
Notifications
You must be signed in to change notification settings - Fork 3
Sample
Kanji Tanaka edited this page Nov 19, 2022
·
1 revision
serverless.yml samples for some Cargo.toml.
If no [ [bin] ] in Cargo.toml
Cargo.toml
[package]
name = "simple-package"
version = "0.1.0"
...
[dependencies]
lambda_runtime = "0.7"
...
then the handler for each function is [package name].
serverless.yml
functions:
hello:
handler: simple-package
...
Cargo.toml
[package]
name = "multi-binaries"
version = "0.1.0"
...
[[bin]]
name = hello
path = "src/bin/hello.rs"
[[bin]]
name = world
path = "src/bin/world.rs"
[dependencies]
lambda_runtime = "0.7"
...
then the handler for each function is [package name].[bin name].
serverless.yml
functions:
hello:
handler: multi-binaries.hello
...
world:
handler: multi-binaries.world
...