All Projects → asaaki → rust-wasm-on-lambda-edge

asaaki / rust-wasm-on-lambda-edge

Licence: other
Rust/WASM on AWS Lambda@Edge (CloudFront)

Programming Languages

rust
11053 projects
Makefile
30231 projects
javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to rust-wasm-on-lambda-edge

aws-lambda-edge-basic-auth-terraform
A Terraform module that creates AWS Lambda@Edge resources to protect CloudFront distributions with Basic Authentication.
Stars: ✭ 18 (+50%)
Mutual labels:  aws-lambda, cloudfront, aws-cloudfront, aws-lambda-edge
Seed
A Rust framework for creating web apps
Stars: ✭ 3,069 (+25475%)
Mutual labels:  wasm, wasm-bindgen
Serverless static website with basic auth
Builds a serverless infrastructure in AWS for hosting a static website protected with Basic Authentication and published on a subdomain registered via Route 53
Stars: ✭ 112 (+833.33%)
Mutual labels:  aws-lambda, cloudfront
Serverless Sharp
Serverless image optimizer for S3, Lambda, and Cloudfront
Stars: ✭ 102 (+750%)
Mutual labels:  aws-lambda, cloudfront
rust-monaco
Rust WASM bindings for the Monaco Editor
Stars: ✭ 23 (+91.67%)
Mutual labels:  wasm, wasm-bindgen
terraform-aws-cloudfront
Terraform module which creates CloudFront resources on AWS 🇺🇦
Stars: ✭ 56 (+366.67%)
Mutual labels:  cloudfront, aws-cloudfront
React Apig Lambda
Render React.js on-demand with CDN caching
Stars: ✭ 93 (+675%)
Mutual labels:  aws-lambda, cloudfront
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+24708.33%)
Mutual labels:  aws-lambda, cloudfront
aws-cfn-custom-resource-lambda-edge
🏗 AWS CloudFormation custom resource that allows deploying Lambda@Edge from any region
Stars: ✭ 19 (+58.33%)
Mutual labels:  aws-cloudfront, aws-lambda-edge
matchbox
Painless peer-to-peer WebRTC networking for rust wasm
Stars: ✭ 276 (+2200%)
Mutual labels:  wasm, wasm-bindgen
wasm-bindgen-webcam-stream
A small example on how to get webcam stream on rust-wasm
Stars: ✭ 11 (-8.33%)
Mutual labels:  wasm, wasm-bindgen
nestjs-graphql-serverless
Boilerplate for using NestJS with GraphQL (Code-First) on serverless environment (AWS Lambda)
Stars: ✭ 64 (+433.33%)
Mutual labels:  aws-lambda
wasm2kt
Web Assembly to Kotlin and Java converter. Allows to compile a C or C++ program/library, and generate a Kotlin or Java program/library.
Stars: ✭ 20 (+66.67%)
Mutual labels:  wasm
reqwasm
HTTP requests library for WASM Apps
Stars: ✭ 81 (+575%)
Mutual labels:  wasm
wazm
Web Assembly Zig Machine
Stars: ✭ 54 (+350%)
Mutual labels:  wasm
jschr.io
The static website generator service behind jschr.io.
Stars: ✭ 70 (+483.33%)
Mutual labels:  aws-lambda
as-sha256
AssemblyScript implementation of SHA256
Stars: ✭ 15 (+25%)
Mutual labels:  wasm
chocs
Modern HTTP framework for AWS Serverless and WSGI compatible servers.
Stars: ✭ 15 (+25%)
Mutual labels:  aws-lambda
sensu-plugins-aws
This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
Stars: ✭ 79 (+558.33%)
Mutual labels:  cloudfront
amazon-ivs-ecommerce-web-demo
This repository shows how you can build a compelling eCommerce experience with Amazon IVS.
Stars: ✭ 19 (+58.33%)
Mutual labels:  aws-lambda

Rust/Wasm on AWS Lambda@Edge (CloudFront)

Read the accompanying blog post to this project.

Since we still cannot have native Rust (or WebAssembly for that matter) on AWS Lambda@Edge, 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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].