Rust/Wasm on AWS [email protected] (CloudFront)

Read the accompanying blog post to this project.

Since we still cannot have native Rust (or WebAssembly for that matter) on AWS [email protected], we have to come up with our own solution. Here I present mine: using the AWS Lambda Node.js enviroment to execute our Wasm blob generated from Rust code.

tl;dr

make build
make call
make zip
# upload to your AWS Lambda and attach it to a CloudFront distribution (as viewer request trigger)
# check the Cloudwatch logs in the regions you made requests
# be happy - Have a nice day!

This demo doesn't do anything fancy. In fact, it does not alter the request at all and only passes it through as-is.

The function will make a few log statements, check the Cloudwatch logs in the regions you received requests for your CloudFront distribution.

This setup is good to test for the baseline performance.

After the cold-start some requests later the function duration should be around 1 to 2 ms.

Depending on the region and where you are, this translates to 40 to 50 ms in request latency for a small static asset, while without any trigger attached the same request would take around 25 ms.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Versions

Find the latest versions by id

Information - Updated May 14, 2022

Stars: 12
Forks: 1
Issues: 1

This is an example of a Rust server that functions as a remote schema for...

Rust + Hasura Rust server that functions as a Hasura

This is an example of a Rust server that functions as a remote schema for...

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

It is designed to be easily extendable and easy to use

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

It is designed to be easily extendable and easy to use

Newport Engine is a modular 2D and 3D game engine built in Rust for Rust

liboqs-rust: Rust bindings for liboqs

Qyantum Safe liboqs rust bindings

liboqs-rust: Rust bindings for liboqs

msgflo-rust: Rust participant support for MsgFlo

Flowhub visual programming IDE

msgflo-rust: Rust participant support for MsgFlo

Trojan-rust is a rust implementation for Trojan protocol that is targeted to circumvent GFW

Trojan protocol that is targeted to circumvent tokio-rs to achieve high performance async io

Trojan-rust is a rust implementation for Trojan protocol that is targeted to circumvent GFW
Actix

1.0K

How to be a full stack Rust Developer

Read Rust the Rust blog posts at Steadylearner

How to be a full stack Rust Developer

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

This is the place to translate Having a documentation in your native language is essential if you don't speak English, and still enjoyable even if...

Rust library translation (rust-src/rust-std/stdlib/rustlib translation)

False Positive for rust-lang/rust#83583

The deprecation lint proc_macro_derive_resolution_fallback is intended to catch proc macro generated code that refers to items from parent modules that should not be in scope:

False Positive for rust-lang/rust#83583

A CHIP-8 & SuperChip interpreter written in Rust using rust-sdl2

If you're getting compile errors it may be because

A CHIP-8 & SuperChip interpreter written in Rust using rust-sdl2

Rust-Svelte-on-Rust

Starter template for Rocket backend server

Rust-Svelte-on-Rust
Facebook Instagram Twitter GitHub Dribbble
Privacy