In this section, we will create a microservice that works in a serverless environment using AWS Lambda. We will reimplement the random number generator from Chapter 4, Data Serialization and Deserialization with Serde Crate, in the Data format for interaction with microservices section.
Minimal Rust microservices for AWS Lambda
Dependencies
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...