aws-lambda-rust-runtime
cargo-lambda
aws-lambda-rust-runtime | cargo-lambda | |
---|---|---|
30 | 17 | |
3,173 | 614 | |
1.3% | 6.5% | |
8.9 | 8.6 | |
14 days ago | about 14 hours ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
aws-lambda-rust-runtime
-
Cognito Starter Kit with Rust and Lambda
I've been writing more and more about the benefits of Rust and Lambda quite a bit lately and I plan to take advantage of them in this customizer. Additionally, I've leveraged the Lambda Runtime project that includes data structures for the Lambda Events that I'll encounter while working with these payloads.
-
Rust and Lambda
The Lambda Rust Runtime project bridges that gap between SDK support and enhanced developer experience. Now this code IS flagged as experimental as it is subject to change. Didn't I just say above that I don't like experimental software in production? For something like a critical SDK into AWS, yes. But for something that is mostly data structures and working with different Lambda events, I don't have an issue. I'm comfortable with recommending builders look into this repository. I've also been fortunate to contribute to it and believe that the libraries included will make builder's lives easier. End of the day, if the experimental piece is a hold-up, a Lambda with Rust will be fine without it.
-
Customize Cognito Access Token with Rust
If you are building Rust applications that are deployed in Lambdas, it's well worth your time to check out this AWS project. And nestled inside that repository is a Lambda Events crate that helps with the serde/deserde of different payloads to be encountered when running Lambdas.
-
AWS Support for Rust on Lambda - Concerns?
Feel free to take look at the GitHub repo and ask any questions you have there, we're always happy to help in what we can: https://github.com/awslabs/aws-lambda-rust-runtime
-
Learn Rust 101 – A guide to aid you in your journey of becoming a Rustacean
Rust on Lambda's using containers as the deployment artifact are also very good, i'd say a perfect match. Low artifact size, low cpu+memory usage, fast execution. I think AWS must be using increasingly using Rust on Lambda internally from the talks I've seen them publish and the work gone in to https://github.com/awslabs/aws-lambda-rust-runtime.
For simple REST API's there's not much extra effort in using Rust once you are familiar.
-
Rust on AWS Lambda?
Check out the official AWS Lambda Rust project https://github.com/awslabs/aws-lambda-rust-runtime. It has a bunch of examples and we’ll designed. I got up and running knowing minimal Rust very quickly.
-
Rust on Lambda Interest?
The official https://github.com/awslabs/aws-lambda-rust-runtime seems well architected.
-
State of Rust for web backends
Hi, maybe check out https://github.com/awslabs/aws-lambda-rust-runtime there's some examples in there.. But essentially you can build a Lambda function and deploy to your AWS account with this toolset.
-
API Gateway to a Lambda function using Lambda proxy and non-proxy)integration, with OpenAPI specs
use aws_lambda_events::apigw::{ ApiGatewayCustomAuthorizerRequestTypeRequest, ApiGatewayCustomAuthorizerResponse, ApiGatewayCustomAuthorizerPolicy, IamPolicyStatement, }; use lambda_runtime::{run, service_fn, Error, LambdaEvent}; use serde_json::json; #[tokio::main] async fn main() -> Result<(), Error> { tracing_subscriber::fmt() .with_ansi(false) .without_time() .with_max_level(tracing_subscriber::filter::LevelFilter::INFO) .init(); run(service_fn(function_handler)).await } pub async fn function_handler(event: LambdaEvent) -> Result { // do something with the event payload let method_arn = event.payload.method_arn.unwrap(); // for example we could use the authorization header if let Some(token) = event.payload.headers.get("authorization") { // do something with the token // my custom logic return Ok(custom_authorizer_response( "ALLOW", "some_principal", &method_arn, )); } Ok(custom_authorizer_response( &"DENY".to_string(), "", &method_arn)) } pub fn custom_authorizer_response(effect: &str, principal: &str, method_arn: &str) -> ApiGatewayCustomAuthorizerResponse { let stmt = IamPolicyStatement { action: vec!["execute-api:Invoke".to_string()], resource: vec![method_arn.to_owned()], effect: Some(effect.to_owned()), }; let policy = ApiGatewayCustomAuthorizerPolicy { version: Some("2012-10-17".to_string()), statement: vec![stmt], }; ApiGatewayCustomAuthorizerResponse { principal_id: Some(principal.to_owned()), policy_document: policy, context: json!({ "email": principal }), // https://github.com/awslabs/aws-lambda-rust-runtime/discussions/548 usage_identifier_key: None, } }
-
Rust for microservices, AWS lambda functions, etc?
FYI, there’s an offical rust “runtime” in the works: https://github.com/awslabs/aws-lambda-rust-runtime
cargo-lambda
-
My Personal Serverless Rust Developer Experience. It’s Better Than You Think
Without a solid build and debug experience, achieving a quality Serverless Rust Developer Experience would be next to impossible. For the next two sections of my setup, I leverage Cargo Lambda pretty hard. Cargo Lambda is a project that brings a subcommand into the Cargo ecosystem for building and testing Lambdas locally. I could also use it for deploying, but I stick to CDK for that.
-
Rust and Lambda
Tooling: I'll talk more about it below, but I love Cargo Lambda. I appreciate the fact that I can use SAM or CDK to build and deploy my code. And I've become a fan of using CodeWhisperer with VSCode to build my Rust Lambdas.
-
API Gateway, Lambda, DynamoDB and Rust
A few months back, the AWS SAM team released "beta" support for Rust using Cargo Lambda. Cargo is the crate/library manager for Rust and this additional subcommand brings in a lot of additional functionality. Per the Cargo Lambda team:
-
Consuming an SQS Event with Lambda and Rust
My journey through consuming an SQS Event with Lambda and Rust was enhanced when I embraced Cargo Lambda. Per the documentation:
-
Dynarust - no excuse for not using rust in AWS now - a DynamoDB ODM library that uses serde_json for mapping native rust structs to Dynamo items.
I have been using this code for a while in my rust projects, mainly for backend development deployed on AWS lambdas with https://www.cargo-lambda.info/.
- Rust and Serverless | Current State of First-Class Support for Rust
-
Datadog APM
Has anyone experience with sending Traces from a Rust AWS Lambda (I've built mine with cargo-lambda) to Datadog APM? Sadly, there is nothing official yet and therefore also no examples I could try. Maybe some of you already have done it and could provide me with an example / tutorial?
-
Large Rust Lambda Package Size
Recently, I've been using cargo-lambda and cargo-lambda-cdk to deploy rust lambdas on AWS with the CDK.
-
Rust on Lambda Interest?
Hey op, have you used cargo-lambda? I haven't, but I wonder if it might help with whatever usability issues you've run into.
-
Rust on Lambda - Interest?
Have you tried https://www.cargo-lambda.info ? What are your thoughts on it? (not my project)
What are some alternatives?
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
dynarust - A DynamoDB odm library for rust
Rocket - A web framework for Rust.
lambda-log-router - Example project for deploying an AWS Lambda Function with a Lambda Extension written in Rust.
aws-cdk - The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
async-graphql - A GraphQL server library implemented in Rust
OpenSSL - TLS/SSL and crypto library
sam-rust-sqs-lambda-reader - Example repository to showcase Rust, Lambda and SAM
FrameworkBenchmarks - Source for the TechEmpower Framework Benchmarks project
rust-chromium-azure-functions-crawler-poc - PoC of a crawler/scraper built with Rust and Chromium to pre-render and scrape websites. Can be hosted on Azure Functions or standalone!
upx-action - Strips and runs upx on binaries
opentelemetry-rust - The Rust OpenTelemetry implementation