Skip to content

Releases: awslabs/aws-lambda-rust-runtime

v0.5.2-lambda-http

09 May 21:58
efb7f69
Compare
Choose a tag to compare

What's Changed

  • Expose the raw http path coming from the lambda event. by @calavera in #453
  • allow customized User_Agent for lambda runtime api client by @bnusunny in #454
  • Document option to run functions locally. by @calavera in #460
  • Fixed invalid architectures reference in the SAM snippet (#1) by @lukepfeiffer10 in #464

New Contributors

Full Changelog: v0.5.1-runtime...v0.5.2-lambda-http

lambda_runtime release v0.5.1

20 Mar 16:30
015921e
Compare
Choose a tag to compare

What's Changed

  • Call handler.poll_ready() before handler.call() by @lazear in #437
  • Relax Send constraint in lambda-http by @fmonniot in #442

New Contributors

Full Changelog: v0.5.1...v0.5.1-runtime

lambda_http release v0.5.1

26 Feb 19:19
850606f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.0...v0.5.1

Release 0.5.0

20 Feb 21:10
fbc24b2
Compare
Choose a tag to compare

Noteworthy changes

Changelog

New Contributors

Full Changelog: v0.4.1...v0.5.0

Release 0.4.1

08 Sep 15:59
4dd6817
Compare
Choose a tag to compare

New:

  • Set _X_AMZN_TRACE_ID environment variable for x-ray #341

Release 0.4.0

05 Aug 16:57
7e2cd97
Compare
Choose a tag to compare

New:

  • Removal of the 'static lifetime bound requirements on both lambda-http and lambda-runtime to allow for shared resources that exist in between invocations that land on the same Lambda Sandbox. See: #333 and #319
  • Addition of default header handling that was breaking local SAM CLI testing. See: #332

Release 0.3.0

12 Mar 23:41
fd13527
Compare
Choose a tag to compare

0.3.0

New: Almost everything!

  • Heavy restructuring was done in order to simplify the runtime and to enable asynchronous handlers by default.

  • The lambda crate has been renamed to lambda_runtime, and the original lambda_runtime has been removed from the project. lambda_http remains the same.

  • The lambda_http crate now supports API Gateway HTTP API Lambda triggers.

  • Both lambda_runtime and lambda_http have noteworthy, breaking API changes. The following is a rough approximation of what a transition to the new runtime API will be:

    note: the runtime is based on std::future::Future based and relies on Tokio via Hyper.

    main.rs

    -use lambda_runtime::{error::HandlerError, lambda, Context};
    +use lambda_runtime::{handler_fn, Context};
    use serde_json::Value;
    
    +type Error = Box<dyn std::error::Error + Sync + Send + 'static>;
    
    -fn main() {
    -    lambda!(handler)
    
    +#[tokio::main]
    +async fn main() -> Result<(), Error> {
    +    lambda_runtime::run(handler_fn(handler)).await?;
    +    Ok(())
    }
    
    -fn handler(
    -    event: Value,
    -    _: Context,
    -) -> Result<Value, HandlerError> {
    +async fn handler(
    +    event: Value,
    +    _:Context
    +) -> Result<Value, Error> {
        Ok(event)
    }

Please refer to the examples in (lambda-runtime/examples; lambda-http/examples) for more detail.

Release 0.2.0

25 Jan 04:01
66c0ba0
Compare
Choose a tag to compare

Features

  • New: We created lambda_runtime_core crate that implements the runtime's main loop and supports handlers that accept and return Vec<u8>. (#53)
  • New: The primary lambda_runtime crate is a wrapper on top of the lambda_runtime_core handler (#53).
  • New: The lambda_http crate, which enables support for API Gateway or ALB requests, treating them as Request structs from the http crate (#18 by @softprops).
  • New: The lambda_runtime_errors crate introduces the LambdaErrorExt trait that enables the ability to specify custom errorType values for the Lambda Runtime API. The change also includes a companion derive crate that makes it easy to automatically generate LambdaErrorExt implementations for crate-local error types (#63).
  • Fix: Handlers can now return any error type (#54).
  • Fix: Support for closures as handlers (#19 by @srijs).
  • Fix: Multiple bug fixes and performance improvements (thanks @Sh4rK).