Sourced from @aws-lambda-powertools/logger
's
releases.
v2.2.0
Summary
This release improves 1/ Idempotency now handles payloads with out-of-order keys and functions with no return value, and 2/ Batch Processing can optionally continue processing messages with different group IDs for SQS FIFO queues.
🌟 ⭐ Special thanks to our contributors
@daschaa
and@arnabrahman
- thank you for your work on this release!Idempotency
Deep sort payload
⚠️ Previously processed transactions with out-of-order keys might lose idempotency guarantees
We now sort payloads before creating an idempotency key. Before, we were serializing them with the keys in the order they were provided.
In use cases where the client can send out-of-order payloads like REST APIs, browser clients, and proxies this could have caused the request to not be idempotent.
For example, the following two payloads would have resulted in two different hashes before this release:
Make functions idempotent with no return value
You can now make your function idempotent even if it returns no value. This is useful when your want to trigger AWS Step Functions workflow, or fire-and-forget other services or APIs. Before, Idempotency required an explicit return value and would have failed if not provided.
Batch Processing
Skip processing failed group id messages of SQS FIFO queues on error
You have now a new flag skipGroupOnError to return the messages from a failed group ID back to SQS and continue processing messages from subsequent group IDs. Previously, Batch stopped processing upon any failure regardless of the message group ID.
Parser (beta)
Fix sourceIp validation for APIGatewayProxyEvent for Management Console
APIGatewayProxyEvent
is now compatible with the test payload from Amazon API Gateway Console. When testing an endpoint from the AWS Console, API Gateway sends a mock source IP value,test-invoke-source-ip
, causing the validation to fail. The Parser utility now includes an override to handle this edge case.Changes
- test(idempotency): fix integration tests (#2622) by
@dreamorosi
... (truncated)
Sourced from @aws-lambda-powertools/logger
's
changelog.
2.2.0 (2024-06-13)
Bug Fixes
- idempotency: deep sort payload during hashing (#2570) (6765f35)
- parser: handle API Gateway Test UI sourceIp (#2531) (cd6c512)
Features
b35f9f1
chore(ci): bump version to 2.2.0 (#2647)df6952a
chore(deps-dev): pin lerna to 8.1.2 (#2646)9f58754
chore(deps): bump the aws-sdk group across 1 directory with 9 updates
(#2644)825dadf
chore(ci): revert - bump version to 2.2.0 (#2639)
(#2643)bfdd14f
chore(ci): bump version to 2.2.0 (#2639)a649078
chore(deps-dev): bump aws-sdk from 2.1637.0 to 2.1639.0 (#2638)e293476
chore(deps-dev): bump prettier from 3.3.1 to 3.3.2 (#2633)4337323
chore(deps): bump aws-xray-sdk-core from 3.6.0 to 3.9.0 (#2631)e894c7e
docs(tracer): add ESM instructions to tracer usage docs (#2630)b2109af
test(idempotency): fix integration tests (#2622)