Releases: awslabs/aws-lambda-rust-runtime
v0.5.2-lambda-http
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
- @lukepfeiffer10 made their first contribution in #464
Full Changelog: v0.5.1-runtime...v0.5.2-lambda-http
lambda_runtime release v0.5.1
lambda_http release v0.5.1
What's Changed
Full Changelog: v0.5.0...v0.5.1
Release 0.5.0
Noteworthy changes
- A new lambda-extension crate for creating extensions
- Adoption of tower::Service over custom traits
- Adoption of aws_lambda_events for lambda_http
Changelog
- Remove Send bound in http's Handler by @fmonniot in #344
- fix: use correct name of lambda_runtime example by @Velfi in #352
- Remove seemingly unnecessary Req -> Parts -> Req conversion by @simonvandel in #353
- build: BREAKING CHANGE: upgrade tracing-[error|subscriber] by @seanpianka in #358
- Fixed cargo clippy warnings by @coltonweaver in #359
- make handler reference mutable by @Mdrbhatti in #356
- Expanded README on how to build for Amazon Linux 2 x86 or ARM, includ… by @coltonweaver in #360
- feat: inject user agent in Lambda runtime API calls by @nmoutschen in #363
- LambdaRequest lifetime fix by @jelmansouri in #364
- fix: null deserialization of stageVariables for sam local by @nmoutschen in #366
- fix: create a valid URL for REST APIs and ALBs when the host header i… by @nmoutschen in #369
- Removed references to type Error aliases in docs by @rimutaka in #370
- fix: add support for null/invalid type for headers by @nmoutschen in #371
- Lambda Extensions by @calavera in #376
- Remove unused dependencies by @calavera in #381
- fix: cargo fmt fix by @nmoutschen in #378
- feat: add integration tests stack by @nmoutschen in #379
- chore: stable fmt and clippy, set MSRV by @nmoutschen in #383
- fix: add client context and cognito identity to runtime context by @diceride in #382
README.md
: invoke lambda function withraw-in-base64-out
by @david-perez in #385README.md
: add newline to end of file by @david-perez in #386- fix: add support for null/invalid type for multi-value-headers by @mbergkvist in #387
- fix: move clippy::cargo lint to warn level by @bahildebrand in #388
- Change examples to use tracing-subscriber for logging by @bahildebrand in #389
- Allow base paths in the runtime api uri by @calavera in #393
- Wrap incoming extension events in a struct by @calavera in #394
- Fix request query strings by @calavera in #395
- Added some missing fields to ApiGateway and ApiGatewayRequestContext by @vascokk in #403
- Implement tower::Service trait by @nmoutschen in #401
- feat(lambda-http): implement http_body::Body for lambda_http::body by @nmoutschen in #406
- docs(lambda-extension): update README by @nmoutschen in #408
- run lambda_runtime inside Lambda Extensions by @bnusunny in #411
- feat(lambda-extension): Logs API processor by @nmoutschen in #416
- Make errors implement Debug+Display by @calavera in #418
- feat(lambda-extension): make errors implement Debug+Display by @nmoutschen in #419
- chore: bump version to 0.5 by @nmoutschen in #420
- feat(lambda-http): add example with tower_http crate by @nmoutschen in #425
- Replace custom http events with aws_lambda_events by @calavera in #426
- Remove reference to unmaintained repository by @calavera in #427
- docs: revamp build & deployment section by @nmoutschen in #428
- fixes following v0.5.0 releases by @nmoutschen in #429
New Contributors
- @fmonniot made their first contribution in #344
- @Velfi made their first contribution in #352
- @simonvandel made their first contribution in #353
- @seanpianka made their first contribution in #358
- @Mdrbhatti made their first contribution in #356
- @jelmansouri made their first contribution in #364
- @calavera made their first contribution in #376
- @diceride made their first contribution in #382
- @david-perez made their first contribution in #385
- @mbergkvist made their first contribution in #387
- @vascokk made their first contribution in #403
Full Changelog: v0.4.1...v0.5.0
Release 0.4.1
New:
- Set _X_AMZN_TRACE_ID environment variable for x-ray #341
Release 0.4.0
New:
Release 0.3.0
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 tolambda_runtime
, and the originallambda_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
andlambda_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
Features
- New: We created
lambda_runtime_core
crate that implements the runtime's main loop and supports handlers that accept and returnVec<u8>
. (#53) - New: The primary
lambda_runtime
crate is a wrapper on top of thelambda_runtime_core
handler (#53). - New: The
lambda_http
crate, which enables support for API Gateway or ALB requests, treating them asRequest
structs from thehttp
crate (#18 by @softprops). - New: The
lambda_runtime_errors
crate introduces theLambdaErrorExt
trait that enables the ability to specify customerrorType
values for the Lambda Runtime API. The change also includes a companionderive
crate that makes it easy to automatically generateLambdaErrorExt
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).