Simple rust example working as an AWS lambda in api-gateway mode.
I wanted to test lambda functions with rust and understand how to do propper error handling.
It blocks the incoming request for the given (wait) milliseconds. The wait seconds are passed as a query parameter and should be run behind a API-Gateway in proxy mode.
Requires a AWS_PROFILE
with the correct rights for lambda deployment.
AWS_PROFILE=XXXXX cargo lambda build --release --arm64
AWS_PROFILE=XXXXX cargo lambda deploy
See apigw-request for further request parameter.
cargo lambda watch
cargo lambda invoke --data-ascii '{"queryStringParameters": {"wait": "500"}}'