January 2019
Intermediate to advanced
520 pages
14h 32m
English
First, we need to create a new minimal-lambda crate and add the following dependencies to it:
[dependencies]lambda_runtime = { git = "https://github.com/awslabs/aws-lambda-rust-runtime" }log = "0.4"rand = "0.5"serde = "1.0"serde_derive = "1.0"simple_logger = "1.0"
The main dependency we need is lambda_runtime, which is an official crate for writing lambda functions for AWS Lambda platform using Rust. We used a version from GitHub because, at the time of writing, this crate was in active development.
AWS prints the output of all the lambda functions as logs, and we will use the simple_logger crate, which prints all logs to stdout.
We also need to override the name of a binary with lambda, because an environment that run, AWS ...
Read now
Unlock full access