-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rust support for AWS Lambda Powertools #37
Comments
I assume @nmoutschen you are already running this and have a crate (namespace) |
Yep! I've reserved the lambda-powertools crate and am working on a DX proposal at the moment. |
Any chance of re-opening this ticket? |
@ZackKanter thanks for the nudge! As of now, we don't have plans to create Lambda Powertools for Rust due to skill set (@nmoutschen left) and staffing (not planned in the foreseeable future for Rust) -- We'll happily update this issue if that changes it. |
Not sure if anything has changed, but wanted to say this would be welcome |
I'm doing some work to close the gap a bit, at least for metrics. https://crates.io/crates/metrics_cloudwatch_embedded Exampleuse lambda_runtime::{Error, LambdaEvent};
use metrics_cloudwatch_embedded::lambda::handler::run;
use serde::{Deserialize, Serialize};
#[derive(Deserialize)]
struct Request {}
#[derive(Serialize)]
struct Response {
}
async fn function_handler(event: LambdaEvent<Request>) -> Result<Response, Error> {
metrics::increment_counter!("requests", "Method" => "Default");
Ok(Response {})
}
#[tokio::main]
async fn main() -> Result<(), Error> {
tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
.with_target(false)
.without_time()
.compact()
.init();
let metrics = metrics_cloudwatch_embedded::Builder::new()
.cloudwatch_namespace("MetricsExample")
.with_dimension("Function", std::env::var("AWS_LAMBDA_FUNCTION_NAME").unwrap())
.lambda_cold_start_metric("ColdStart")
.with_lambda_request_id("RequestId")
.init()
.unwrap();
run(metrics, function_handler).await
} Output
Under the hood |
Is there an update on this? @nmoutschen |
I no longer work at AWS, so unfortunately, I do not know |
Powertools team here — no updates on Rust for 2024 given investments are
tight atm.
Focus remain on current feature parity between TypeScript (2nd most popular
language), Java, and .NET
…On Mon, 11 Dec 2023 at 16:46, Nicolas Moutschen ***@***.***> wrote:
Is there an update on this? @nmoutschen <https://github.com/nmoutschen>
I no longer work at AWS, so unfortunately, I do not know
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBGUABYNVPSP7WM3E23YI4TFJAVCNFSM5H3QRFUKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBVGAZTINBVGYYQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Too bad i was hoping after the rust sdk v1 release this might come too. |
Runtime:
Rust
Is your feature request related to a problem? Please describe
In the Serverless Lens for the Well Architected Framework, we suggest several best practices for observability such as structured logging, distributed tracing, and monitoring of metrics. The suite of utilities of the AWS Lambda Powertools help developers with the adoption of best practices.
Today, AWS Lambda Powertools is available for the Python and Java runtimes.
In addition to the powertools the crate, the documentation site can help people new to Rust and AWS Lambda to get up in running
Describe the solution you'd like
AWS Lambda Powertools available for
Provided
runtimes, written in Rust.Describe alternatives you've considered
There is almost no alternatives or guidance that i have seen so far.
If you provide guidance, is this something you'd like to contribute?
Absolutely yes.
Additional context
The Rust Powertools will follow the same tenets as the other languages, and folks can expect the same core utilities/ functionalities being supported.
The text was updated successfully, but these errors were encountered: