asaaki/rust-wasm-on-lambda-edge

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

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
Actix

1.2K

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

xbuild is a build tool for rust and rust/flutter projects with support for cross compiling...

xbuild is a build tool for rust and rust/flutter projects with support for cross compiling and

xbuild is a build tool for rust and rust/flutter projects with support for cross compiling...

Rust: setup Rust with rustup

wabt: --sysroot value in the Makefiles when using a different target localtion for wasi-sdk)

Rust: setup Rust with rustup

How to be a full stack Rust Developer

Read Rust the Rust blog posts at Steadylearner

How to be a full stack Rust Developer

Snake game developed in Rust using rust-sdl2 crate

Snake game developed in Rust using

Snake game developed in Rust using rust-sdl2 crate

This is a game engine for rust in rust

I'm building it as a learning experience to try and better understand rust and what goes into making a game engine

This is a game engine for rust in rust
Facebook Instagram Twitter GitHub Dribbble
Privacy