Notes and example of how to build a rust lambda with SAM.
All of this is very much based on this talk from Luciano Mammino at Rust Dublin.
samconfig.toml
configures the sam project. The name of the stack and some other parameters. Thesam deploy --guided
command asks for some defaults and updates the config- SAM deploys the resources that are defined in template.yaml (or something else defined in the config).
- If you change the lambda code you need to
sam build
before you cansam deploy
again. If you dont sam wont see changes (there was no new artefact build) - Sam creates the Role for the Lambda implictly. The guided deploy asks for that.
Or create the role in template.yaml yourself and set it in
AWS::Serverless::Function
- The local development of
cargo lambda
works alongside the sam provided tooling - The fact that there is an
Event
Resource in theFunction
Resource alone makes SAM create an apigateway.
????
- How to connect an application loadbalancer?
- Or just an http function url?