Sourced from @aws-lambda-powertools/logger
's
releases.
v1.14.0
Summary
This release brings all the generally available utilities to the Lambda Layers, improves the Idempotency utility with the addition of a new
@idempotent
class method decorator, and makes Tracer more reliable.Lambda Layers
Starting from version 21, which corresponds to this release, of our Lambda Layer includes the Idempotency, Parameters, and Batch Processing utilities. The layer comes with its own reduced copy of AWS SDK v3 for JavaScript clients so you can easily attach it to Lambda functions running on Node.js 16 without having to bundle the SDK.
The layers are available in most commercial AWS Regions, go here to learn more about how to use them and find the ARN for your region.
Idempotency
If you use decorators you can now make your class methods idempotent thanks to the new
@idempotent
decorator.You can use the decorator on your Lambda handler, like shown in the image above, or on any method that returns a response. This is useful when you want to make a specific part of your code idempotent, for example when your Lambda handler performs multiple side effects and you only want to make part of it safe to retry.
Tracer
When segments generated by your code are about to be sent to the AWS X-Ray daemon, the AWS X-Ray SDK for Node.js serializes them into a JSON string. If the segment contains exotic objects like
BigInt
,Set
, orMap
in the metadata the serialization can throw an error because the nativeJSON.stringify()
function doesn't know how to handle these objects.To guard against this type of runtime errors we have wrapped within
try/catch
logic the branches of code in Tracer where this issue could happen. Now, when an error gets thrown during the serialization of a segment within Tracer, we will catch it and log a warning instead.We are also working with the X-Ray team to add a
replacer
function to the serialization logic directly in the X-Ray SDK so that the issue can be better mitigated.Acknowledgements
Congratulations to
@HaaLeo
and@KhurramJalil
for having your first contribution to the project, thank you for helping make Powertools better for everyone 🎉Note We have officially started working on the next major version of Powertools for AWS (TypeScript) 🔥 We have published a Request For Comment (RFC) that details most of the changes that we have planned and in the coming weeks we'll work on an upgrade guide. We would love to hear what you think about our plan and hear any concern you might have.
Changes
- chore(ci): create v2 alpha release workflow (#1719) by
@dreamorosi
- chore(layers): add Idempotency, Batch, and Parameters to layer (#1712) by
@am29d
🌟New features and non-breaking changes
- feat(idempotency): add idempotency decorator (#1723) by
@am29d
- feat(tracer): add try/catch logic to decorator and middleware close (#1716) by
@dreamorosi
- feat(layers): add
arm64
to integration test matrix (#1720) by@dreamorosi
🌟 Minor Changes
- improv(commons): add number key type to JSONObject type (#1715) by
@KhurramJalil
- refactor(commons): aws sdk util + identity check (#1708) by
@dreamorosi
... (truncated)
Sourced from @aws-lambda-powertools/logger
's
changelog.
1.14.0 (2023-09-29)
Features
- idempotency: add idempotency decorator (#1723) (d138673)
- layers: add
arm64
to integration test matrix (#1720) (61ad5ac)- tracer: add try/catch logic to decorator and middleware close (#1716) (be16b59)
1.13.1 (2023-09-21)
Bug Fixes
1.13.0 (2023-09-18)
Bug Fixes
- batch: Update processor to pass only context to handler (#1637) (6fa09b2)
- docs: update versions.json jq query (4e6f662)
- parameters: return type when options without transform is used (#1671) (b2fe341)
Features
1dc1805
chore(release): v1.14.0 [skip ci]004894a
docs(idempotency): fix docs (#1724)d138673
feat(idempotency): add idempotency decorator (#1723)be16b59
feat(tracer): add try/catch logic to decorator and middleware close (#1716)793f12f
chore(ci): create v2 alpha release workflow (#1719)61ad5ac
feat(layers): add arm64
to integration test matrix (#1720)9cc7190
improv(commons): add number
key type to
JSONObject
type58120e3
chore(layers): add Idempotency, Batch, and Parameters to layer (#1712)ccc0398
chore(layers): bundle assets from source when testing (#1710)02aae6d
refactor(commons): aws sdk util + identity check (#1708)