Skip to content

Releases: aws-powertools/powertools-lambda-typescript

v2.10.0

23 Oct 10:17
cded5ec
Compare
Choose a tag to compare

Summary

This release improves the Logger utility by extending the formatting of errors to include custom properties.

⭐️ Thanks to @kevinpeno, and @ralbertazzi for their contributions to this release!

Log error properties

Docs

you more context over the nature of errors.

For example, consider these two custom error classes:

carbon-21

When calling logger.error('An error occurred', new SuperCustomError('foo', 42)); the log now looks like this:

carbon-20

Changes

  • chore(maintenance): add force-publish to bump all packages (#3238) by @am29d
  • chore(ci): add input type to the publish package workflow (#3236) by @am29d
  • chore(ci): add workflow to publish a single package (#3234) by @am29d
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.14 to 3.0.15 (#3223) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.12 to 3.26.13 (#3202) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.4.2 to 4.4.3 (#3187) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.2 (#3176) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.11 to 3.26.12 (#3174) by @dependabot
  • chore(deps): bump actions/checkout from 4.2.0 to 4.2.1 (#3175) by @dependabot
  • chore(layers): remove schema parsing from layer canary (#3171) by @dreamorosi

🌟New features and non-breaking changes

📜 Documentation updates

  • chore(deps): bump squidfunk/mkdocs-material from 0d4e687 to 31eb7f7 in /docs (#3224) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3220) by @dependabot
  • chore(deps): bump @types/node from 22.7.6 to 22.7.7 (#3221) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 5 updates (#3218) by @dependabot
  • chore(deps): bump constructs from 10.3.0 to 10.4.2 (#3205) by @dependabot
  • chore(deps): bump @types/node from 22.7.5 to 22.7.6 (#3216) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from f9cb76d to 0d4e687 in /docs (#3211) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.40 to 9.5.41 in /docs (#3210) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3203) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3198) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.38 to 9.5.40 in /docs (#3186) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 7aea359 to f9cb76d in /docs (#3185) by @dependabot
  • chore(deps): bump typescript from 5.6.2 to 5.6.3 (#3181) by @dependabot
  • chore(deps): bump @types/node from 22.7.4 to 22.7.5 (#3180) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3192) by @dependabot
  • docs(maintenance): add community content (#3190) by @dreamorosi
  • docs(metrics): clarify single metrics metadata & publish (#3189) by @dreamorosi
  • docs: fix env variable name in logEventIfEnabled() docstring (#3197) by @kevinpeno
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3167) by @dependabot

🔧 Maintenance

  • chore(maintenance): exclude e2e tests from pre-push hook (#3240) by @dreamorosi
  • chore(parser): bump parser to 2.10.0 (#3230) by @am29d
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3220) by @dependabot
  • chore(deps): bump @types/node from 22.7.6 to 22.7.7 (#3221) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from 61c3428 to d493ef0 in /.devcontainer (#3214) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 5 updates (#3218) by @dependabot
  • chore(deps-dev): bump @biomejs/biome from 1.9.3 to 1.9.4 (#3219) by @dependabot
  • chore(deps-dev): bump @vitest/coverage-v8 from 2.1.2 to 2.1.3 (#3206) by @dependabot
  • chore(deps): bump constructs from 10.3.0 to 10.4.2 (#3205) by @dependabot
  • chore(deps-dev): bump aws-sdk-client-mock-vitest from 4.0.0 to 4.0.1 (#3215) by @dependabot
  • chore(deps): bump @types/node from 22.7.5 to 22.7.6 (#3216) by @dependabot
  • chore(deps-dev): bump the aws-sdk-v3 group across 1 directory with 2 updates (#3207) by @dependabot
  • chore(deps-dev): bump typedoc from 0.26.8 to 0.26.10 in the typedoc group across 1 directory (#3209) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3203) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3198) by @dependabot
  • chore(deps): bump typescript from 5.6.2 to 5.6.3 (#3181) by @dependabot
  • chore(deps): bump @types/node from 22.7.4 to 22.7.5 (#3180) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3192) by @dependabot
  • chore(deps-dev): bump @biomejs/biome from 1.9.0 to 1.9.3 (#3177) by @dependabot
  • chore(deps-dev): bump typedoc from 0.26.7 to 0.26.8 in the typedoc group across 1 directory (#3166) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from 426f06d to 61c3428 in /.devcontainer (#3141) by @dependabot
  • chore(deps-dev): bump @vitest/coverage-v8 from 2.1.1 to 2.1.2 (#3152) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3167) by @dependabot
  • chore(deps-dev): bump aws-cdk from 1.155.0 to 1.161.0 in layers (#3169) by @dreamorosi

This release was made possible by the following contributors:

@am29d, @dreamorosi, @kevinpeno, and @ralbertazzi

v2.9.0

08 Oct 13:31
71e70f5
Compare
Choose a tag to compare

Summary

This release introduces 1/ the ability to process records sequentially when working with async functions in Batch Processing, 2/ a new option for Idempotency to manipulate the payload stored for idempotent operations, and 3/ the option to specify custom JMESPath functions when selecting an idempotency key.

Finally, you can now use the Parser utility when using our public AWS Lambda layers.

⭐️ Thanks to @arnabrahman, @garysassano and, @scratchclaggy for their big contributions to this release!

Sequential async processing

Docs

You can now process records sequentially when working with async functions in Batch Processing by setting the processInParallel option to false. This is useful for when you want to opt-out of the default behavior and preserve the order of the records.

carbon-4

Manipulating idempotent responses

Docs

Now you can set up a responseHook function when configuring the Idempotency utility to manipulate the returned data when an operation is idempotent.

carbon-3

Custom JMESPath functions with Idempotency

Docs

You can now use custom JMESPath functions with the Idempotency utility by configuring the jmesPathOptions in your idempotency configuration. This is useful when you’re making idempotent operations that accept complex payloads or encoding formats that are not supported by default.

carbon-4

Changes

  • chore(layers): remove schema parsing from layer canary (#3171) by @dreamorosi
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.12 to 3.0.14 (#3162) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.9 to 3.26.11 (#3157) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#3122) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.8 to 3.26.9 (#3114) by @dependabot
  • chore(deps): bump actions/setup-node from 4.0.3 to 4.0.4 (#3097) by @dependabot
  • chore(layers): add Parser to layer (#3101) by @scratchclaggy
  • chore(deps): bump github/codeql-action from 3.26.7 to 3.26.8 (#3087) by @dependabot

🌟New features and non-breaking changes

  • feat(idempotency): ability to specify JMESPath custom functions (#3150) by @arnabrahman
  • feat(batch): sequential async processing of records for BatchProcessor (#3109) by @arnabrahman
  • feat(idempotency): manipulate idempotent response via response hook (#3071) by @arnabrahman

🌟 Minor Changes

  • refactor(logger): use LogLevelThreshold constant inside Logger class (#3133) by @arnabrahman

📜 Documentation updates

  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3163) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3156) by @dependabot
  • chore(maintenance): add Flyweight customer reference (#3161) by @dreamorosi
  • docs(parser): highlight JSONStringify helper (#3158) by @dreamorosi
  • feat(idempotency): ability to specify JMESPath custom functions (#3150) by @arnabrahman
  • chore(deps): bump @types/node from 22.7.2 to 22.7.4 (#3139) by @dependabot
  • feat(batch): sequential async processing of records for BatchProcessor (#3109) by @arnabrahman
  • chore(deps): bump mkdocs-material from 9.5.36 to 9.5.38 in /docs (#3121) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 22a429f to 7aea359 in /docs (#3120) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3116) by @dependabot
  • chore(docs): recreate requirements.txt file for mkdocs container (#3119) by @leandrodamascena
  • chore(deps): bump squidfunk/mkdocs-material from 2a70399 to 22a429f in /docs (#3104) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.35 to 9.5.36 in /docs (#3105) by @dependabot
  • chore(deps): bump @types/node from 22.5.5 to 22.7.2 (#3115) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3110) by @dependabot
  • chore(deps): bump esbuild from 0.23.1 to 0.24.0 (#3102) by @dependabot
  • docs(idempotency): fix descriptions in Advanced table (#3092) by @garysassano
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 6 updates (#3107) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3088) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3090) by @dependabot
  • feat(idempotency): manipulate idempotent response via response hook (#3071) by @arnabrahman
  • chore(deps): bump squidfunk/mkdocs-material from a2e3a31 to 2a70399 in /docs (#3082) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.34 to 9.5.35 in /docs (#3084) by @dependabot
  • chore(deps): bump @types/node from 22.5.4 to 22.5.5 (#3067) by @dependabot

🔧 Maintenance

  • chore(deps-dev): bump aws-cdk from 1.155.0 to 1.161.0 in layers (#3169) by @dreamorosi
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3163) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3156) by @dependabot
  • chore(maintenance): add Flyweight customer reference (#3161) by @dreamorosi
  • chore(metrics): expose MetricsInterface as return type of single metric and further improve API docs (#3145) by @dreamorosi
  • test(idempotency): switch e2e tests to vitest (#3149) by @dreamorosi
  • test(logger): switch e2e tests to vitest (#3148) by @dreamorosi
  • chore(deps): bump @types/node from 22.7.2 to 22.7.4 (#3139) by @dependabot
  • chore(deps): bump @aws-sdk/client-lambda from 3.658.1 to 3.659.0 in the aws-sdk-v3 group across 1 directory (#3127) by @dependabot
  • test(logger): migrate to vitest & custom matchers (#3131) by @dreamorosi
  • test(event-handler): migrate to vitest (#3126) by @dreamorosi
  • test(idempotency): migrate to vitest (#3124) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3116) by @dependabot
  • chore(deps): bump @types/node from 22.5.5 to 22.7.2 (#3115) by @dependabot
  • chore(deps): bump aws-xray-sdk-core from 3.10.0 to 3.10.1 (#3095) by @dependabot
  • chore(deps): bump @aws-cdk/cli-lib-alpha to 2.160.0-alpha.0 (#3118) by @dreamorosi
  • chore(deps-dev): bump @faker-js/faker from 9.0.1 to 9.0.2 (#3113) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3110) by @dependabot
  • chore(deps): bump esbuild from 0.23.1 to 0.24.0 (#3102) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from b303046 to 426f06d in /.devcontainer (#3108) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 6 updates (#3107) by @dependabot
  • chore(deps): bump rollup from 4.21.3 to 4.22.4 (#3106) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3088) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3090) by @dependabot
  • chore(deps-dev): bump @faker-js/faker from 9.0.0 to 9.0.1 (#3075) by @dependabot
  • chore(deps): bump vite from 5.4.5 to 5.4.6 (#3081) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from f1e8fdc to b303046 in /.devcontainer (#3080) by @dependabot
  • test(jmespath): switch tests to vitest (#3079) by @dreamorosi
  • test(commons): migrate to vitest (#3060) by @dreamorosi
  • chore(deps-dev): bump @vitest/coverage-v8 from 2.1.0 to 2.1.1 (#3068) by @dependabot
  • chore(deps): bump @types/node from 22.5.4 to 22.5.5 (#3067) by @dependabot

This release was made possible by the following contributors:

@arnabrahman, @dependabot, @dependabot[bot], @dreamorosi, @garysassano, @github-actions, @github-actions[bot], @leandrodamascena and @scratchclaggy

v2.8.0

16 Sep 12:37
af831b8
Compare
Choose a tag to compare

Summary

This release introduces 1/ the ability store parameters on AWS System Manager Parameter Store using the Parameters utility, and 2/ a new option for Logger that you can use to specify the order of how keys appear in your JSON-structured logs.

We are also adding a new TRACE log level to align with AWS Lambda Advanced Logging Controls (ALC), and improved made improvements to errors in the Idempotency utility, which now include more details on the cause of the error.

Finally, you can now use our public AWS Lambda Layers in two new AWS Regions: ap-south-2 and me-central-1.

⭐️ Thanks to @daschaa, @arnabrahman, and @timo92 for their contributions to this release!

Store parameters using SSM

Docs

In response to customer requests, you can now store parameters using AWS System Manager Parameter Store with the setParameter function. This new helper function fits right in with the other Parameters features you know and love, and provides a seamless experience without having to deal with the AWS SDK.

carbon-3

A big thank you to @daschaa for working on this feature!

Specify log keys order

Docs

You can now change the order of the keys in your logs via the logRecordOrder constructor parameter when using Logger. This is useful when you want to customize how the logs are structured without having to create and maintain your own custom log formatter.

carbon-4

When you specify one or more keys in the logRecordOrder we’ll place these keys first, followed by all the other keys in the log.

Thank you to @arnabrahman for adding this feature!

v1.x Reached End-of-Life (EOL)

Starting from September 1st 2024, v1.x of Powertools for AWS Lambda (TypeScript) has reached EOL and will not receive any further updates in accordance with our Versioning Policy.

We recommend you to upgrade to v2.x as soon as possible to continue receiving new feature and bug fixes. If you are having issues migrating and need support, please reach out via one of our channels or open a discussion on our repo.

Changes

  • chore(deps): bump github/codeql-action from 3.26.6 to 3.26.7 (#3064) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.11 to 3.0.12 (#3034) by @dependabot
  • chore(maintenance): switch to unmanaged log group for functions (#3014) by @dreamorosi
  • chore(maintenance): remove obsolete workflow (#3016) by @dreamorosi
  • chore(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0 (#3006) by @dependabot
  • chore(deps): bump actions/setup-python from 5.1.1 to 5.2.0 (#3001) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.5 to 3.26.6 (#2996) by @dependabot
  • docs(parameters): review API docs & README for Parameters (#2994) by @am29d
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.10 to 3.0.11 (#2979) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.4 to 3.26.5 (#2978) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.2 to 3.26.4 (#2968) by @dependabot
  • chore(deps): bump github/codeql-action from 3.26.1 to 3.26.2 (#2932) by @dependabot
  • test(logger): simplify unit tests structure (#2942) by @dreamorosi
  • chore(deps): bump github/codeql-action from 3.26.0 to 3.26.1 (#2925) by @dependabot
  • test(idempotency): simplify wrapper & middleware tests (#2919) by @dreamorosi
  • chore(deps): bump actions/upload-artifact from 4.3.4 to 4.3.6 (#2895) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.15 to 3.26.0 (#2894) by @dependabot

🌟New features and non-breaking changes

  • feat(parameters): adds setParameter function to store SSM parameters (#3020) by @daschaa
  • feat(logger): introduce log key reordering functionality (#2736) by @arnabrahman
  • feat(logger): introduce loglevel trace #1589 (#2902) by @timo92

🌟 Minor Changes

📜 Documentation updates

  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3066) by @dependabot
  • chore(deps-dev): bump tsx from 4.19.0 to 4.19.1 (#3062) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3049) by @dependabot
  • docs(tracer): clarify escape hatch mechanism (#3056) by @dreamorosi
  • docs(idempotency): add callout about undefined early return (#3055) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3048) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3045) by @dependabot
  • feat(parameters): adds setParameter function to store SSM parameters (#3020) by @daschaa
  • chore(docs): fix spelling issues (#3039) by @dreamorosi
  • chore(deps): bump typescript from 5.5.4 to 5.6.2 (#3041) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#3038) by @dependabot
  • chore(deps): bump @types/node from 22.5.2 to 22.5.4 (#3026) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#3036) by @dependabot
  • feat(logger): introduce log key reordering functionality (#2736) by @arnabrahman
  • docs(maintenance): fix install instructions & switch test runner (#3030) by @dreamorosi
  • docs(maintenance): mark 1.x as EoL on docs (#3019) by @dreamorosi
  • chore(deps): bump mkdocs-material from 9.5.33 to 9.5.34 in /docs (#3005) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 7132ca3 to a2e3a31 in /docs (#3004) by @dependabot
  • chore(deps): bump @types/node from 22.5.1 to 22.5.2 (#3008) by @dependabot
  • chore(deps): bump aws-cdk from 2.145.0 to 2.155.0 in the aws-cdk group across 1 directory (#3007) by @dependabot
  • chore(deps): bump @types/node from 22.5.0 to 22.5.1 (#2998) by @dependabot
  • chore(deps): bump aws-cdk from 2.145.0 to 2.148.1 (#3003) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2999) by @dependabot
  • docs: removed unnecessary exports previously added to api docs (#3000) by @am29d
  • chore(deps): bump ts-jest from 29.2.4 to 29.2.5 (#2981) by @dependabot
  • chore(deps-dev): bump tsx from 4.17.0 to 4.19.0 (#2986) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.143 to 8.10.145 (#2991) by @dependabot
  • chore(deps): bump aws-cdk from 2.145.0 to 2.148.1 (#2988) by @dependabot
  • chore(docs): load self hosted mermaid.js (#2977) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2973) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2972) by @dependabot
  • chore(deps): bump @types/node from 22.4.1 to 22.5.0 (#2966) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.32 to 9.5.33 in /docs (#2971) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from a73e4bb to 7132ca3 in /docs (#2974) by @dependabot
  • chore(deps): bump esbuild from 0.23.0 to 0.23.1 (#2950) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2962) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2958) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.31 to 9.5.32 in /docs (#2953) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 9919d6e to a73e4bb in /docs (#2952) by @dependabot
  • chore(deps): bump @types/node from 22.3.0 to 22.4.1 (#2951) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2931) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2941) by @dependabot
  • chore(deps): bump @types/node from 22.2.0 to 22.3.0 (#2926) by @dependabot
  • docs(logger): add logEventIfEnabled() docs (#2924) by @dreamorosi
  • chore(layers): deploy Lambda layers in ap-south-2 and me-central-1 (#2933) by @dreamorosi
  • feat(logger): introduce loglevel trace #1589 (#2902) by @timo92
  • chore(deps): bump @types/node from 22.1.0 to 22.2.0 (#2914) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2922) by @dependabot
  • docs(idempotency): review API docs & README (#2917) by @am29d
  • chore(maintenance): replace copy command in docs dockerfile (#2911) by @dreamorosi
  • chore(deps): bump @types/aws-lambda from 8.10.142 to 8.10.143 (#2896) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2888) by @dependabot
  • chore(deps-dev): bump tsx from 4.16.5 to 4.17.0 (#2907) by @dependabot

🐛 Bug and hot fixes

  • fix(tracer): include request pathname in trace data (#2955) by @dreamorosi
  • fix...
Read more

v2.7.0

08 Aug 13:44
24c423c
Compare
Choose a tag to compare

Summary

This release 1/ brings a new helper function to parse JSON stringified fields when using Parser, 2/ and improved Metrics, which now can emit metrics using the None unit.

⭐️ Thanks to @daschaa for fixing Logger and making it default to :UTC when encountering an invalid time zone value.

Quickly parse JSON stringified fields

Docs

You can now parse and validate JSON stringified fields using Zod schemas without having to transform them first. This is useful when working with payloads coming from sources that stringify payloads like Amazon API Gateway, Amazon SQS, Amazon Application Load Balancer (ALB), etc.

Use the JSONStringified helper to extend your schemas or any of the built-in schemas in Parser:

carbon-2

Metrics without unit

Docs

You can now create metrics without a unit of measure, this is helpful when your business metrics are tied to an abstract concept or when none of the units supported by the Embedded metric format specification fit.

carbon-2

Changes

  • chore(ci): extract cached-node-modules action (#2876) by @dreamorosi
  • chore(deps): bump github/codeql-action from 3.25.14 to 3.25.15 (#2855) by @dependabot
  • chore(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#2856) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.13 to 3.25.14 (#2845) by @dependabot

🌟New features and non-breaking changes

  • feat(metrics): add unit None for CloudWatch EMF Metrics (#2904) by @am29d
  • feat(parser): add helper functions to transform JSON stringified payloads (#2901) by @am29d

📜 Documentation updates

  • feat(parser): add helper functions to transform JSON stringified payloads (#2901) by @am29d
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2884) by @dependabot
  • chore(deps): bump typescript from 5.4.5 to 5.5.4 (#2820) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2882) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.30 to 9.5.31 in /docs (#2877) by @dependabot
  • chore(deps): bump @types/node from 22.0.2 to 22.1.0 (#2879) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 257eca8 to 9919d6e in /docs (#2881) by @dependabot
  • chore(deps): bump @types/node from 22.0.0 to 22.0.2 (#2872) by @dependabot
  • chore(deps-dev): bump tsx from 4.16.3 to 4.16.5 (#2873) by @dependabot
  • chore(deps): bump ts-jest from 29.1.5 to 29.2.4 (#2874) by @dependabot
  • chore(maintenance): add LocalStack customer reference (#2870) by @dreamorosi
  • chore(deps-dev): bump tsx from 4.16.2 to 4.16.3 (#2867) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2866) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2861) by @dependabot
  • chore(deps): bump @types/node from 20.14.10 to 22.0.0 (#2852) by @dependabot
  • chore: create event-handler utility workspace (#2858) by @dreamorosi
  • chore(maintenance): add Banxware & WeSchool customer references (#2859) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2848) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.141 to 8.10.142 (#2849) by @dependabot
  • chore(maintenance): remove eslint & prettier (#2841) by @dreamorosi
  • chore(maintenance): add caylent as customer reference (#2843) by @dreamorosi

🐛 Bug and hot fixes

  • fix(logger): invalid time zone environment variables leads to error (#2865) by @daschaa

🔧 Maintenance

  • feat(parser): add helper functions to transform JSON stringified payloads (#2901) by @am29d
  • chore(commons): extract lru-cache into commons (#2899) by @dreamorosi
  • chore(deps-dev): bump lint-staged from 15.2.7 to 15.2.8 (#2885) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1667.0 to 2.1668.0 (#2890) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2884) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1666.0 to 2.1667.0 (#2886) by @dependabot
  • chore(deps): bump typescript from 5.4.5 to 5.5.4 (#2820) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2882) by @dependabot
  • chore(deps): bump @types/node from 22.0.2 to 22.1.0 (#2879) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1665.0 to 2.1666.0 (#2880) by @dependabot
  • chore(deps): bump @types/node from 22.0.0 to 22.0.2 (#2872) by @dependabot
  • chore(deps-dev): bump tsx from 4.16.3 to 4.16.5 (#2873) by @dependabot
  • chore(deps): bump ts-jest from 29.1.5 to 29.2.4 (#2874) by @dependabot
  • chore(maintenance): add LocalStack customer reference (#2870) by @dreamorosi
  • chore(deps-dev): bump tsx from 4.16.2 to 4.16.3 (#2867) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1664.0 to 2.1665.0 (#2868) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2866) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2861) by @dependabot
  • chore(deps-dev): bump husky from 9.0.11 to 9.1.4 (#2860) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1663.0 to 2.1664.0 (#2854) by @dependabot
  • chore(deps): bump @types/node from 20.14.10 to 22.0.0 (#2852) by @dependabot
  • chore: create event-handler utility workspace (#2858) by @dreamorosi
  • chore(maintenance): add Banxware & WeSchool customer references (#2859) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2848) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.141 to 8.10.142 (#2849) by @dependabot
  • chore(maintenance): remove eslint & prettier (#2841) by @dreamorosi
  • chore(parser): adds scoped exports for schemas and envelopes (#2847) by @daschaa
  • chore(maintenance): add caylent as customer reference (#2843) by @dreamorosi
  • chore(parser): adds exports for Record schemas (#2846) by @daschaa
  • chore(deps-dev): bump aws-sdk from 2.1659.0 to 2.1663.0 (#2835) by @dependabot

This release was made possible by the following contributors:

@am29d, @daschaa, and @dreamorosi

v2.6.0

25 Jul 14:05
b285858
Compare
Choose a tag to compare

Summary

This release 1/ promotes Parser to Generally Available and ready for production, and 2/ adds support for unsupported types serialization in Logger.

⭐ Big thanks to @daschaa for helping improve our code quality automation
🏅 Congrats to @marlapativ & @sandrokeil on their first contribution

Parser is Generally Available

Docs

We want to thank the community who engaged with us, tested Parser during beta, and provided valuable feedback and contributions to improve everyone' experience.

New to Parser?

Parser provides data validation and parsing using Zod, a TypeScript-first schema declaration and validation library, and comes with built-in schemas and envelopes for common AWS event types for AWS Lambda.

To get started with Parser, you also need to install Zod:

npm install @aws-lambda-powertools/parser zod@~3

Next, you can extend one of the schemas using your own schema, and parse the event both with class method decorators (or Middy.js):

carbon-2

Support unserializable types

Docs

You can now extend the default logic used to emit JSON-structured logs by passing a custom serializer function to the Logger constructor, using the jsonReplacerFn option. This is useful when you want to customize the serialization of specific values.

carbon-3

Changes

  • chore(parser): review imports (#2838) by @dreamorosi
  • chore(deps): bump github/codeql-action from 3.25.12 to 3.25.13 (#2789) by @dependabot
  • chore(maintenance): migrate jmespath utility to biome (#2807) by @dreamorosi
  • chore(maintenance): migrate testing utility to biome (#2808) by @dreamorosi
  • chore(maintenance): migrate idempotency utility to biome (#2810) by @dreamorosi
  • chore(deps): bump aws-actions/closed-issue-message from 36b7048ea77bb834d16e7a7c5b5471ac767a4ca1 to 80edfc24bdf1283400eb04d20a8a605ae8bf7d48 (#2784) by @dependabot
  • chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 (#2765) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.11 to 3.25.12 (#2771) by @dependabot

🌟New features and non-breaking changes

  • feat(parser): allow parser set event type of handler with middy (#2786) by @am29d
  • feat(logger): introduce loglevel constant (#2787) by @marlapativ

🌟 Minor Changes

📜 Documentation updates

  • chore(ci): revert bump version to 2.6.0 (#2836) by @dreamorosi
  • chore(docs): Add lambda layer policy to versioning docs (#2824) by @hjgraca
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2818) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.29 to 9.5.30 in /docs (#2815) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2817) by @dependabot
  • chore(maintenance): migrate snippets to biome (#2814) by @daschaa
  • chore(maintenance): add biome to the project (#2791) by @dreamorosi
  • chore(deps): bump mkdocs-material from 9.5.28 to 9.5.29 in /docs (#2778) by @dependabot

🔧 Maintenance

  • chore(ci): revert bump version to 2.6.0 (#2836) by @dreamorosi
  • chore(parser): mark parser as GA (#2831) by @dreamorosi
  • chore(maintenance): migrate parser utility to biome (#2822) by @daschaa
  • chore(deps-dev): bump typedoc from 0.26.4 to 0.26.5 in the typedoc group across 1 directory (#2819) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2818) by @dependabot
  • chore(maintenance): migrate metrics utility to biome (#2816) by @daschaa
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2817) by @dependabot
  • chore(maintenance): migrate parameters utility to biome (#2812) by @dreamorosi
  • chore(maintenance): migrate tracer utility to biome (#2809) by @dreamorosi
  • chore(maintenance): migrate logger utility to biome (#2813) by @daschaa
  • chore(maintenance): migrate batch utility to biome (#2804) by @dreamorosi
  • chore(maintenance): migrate commons utility to biome (#2805) by @dreamorosi
  • chore(maintenance): migrate layers package to biome (#2806) by @dreamorosi
  • chore(maintenance): add biome to the project (#2791) by @dreamorosi
  • chore(deps-dev): bump aws-sdk from 2.1657.0 to 2.1659.0 (#2776) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from cf26683 to 2ac7b2c in /.devcontainer (#2770) by @dependabot

This release was made possible by the following contributors:

@am29d, @daschaa, @dreamorosi, @hjgraca, @marlapativ and @sandrokeil

v2.5.0

15 Jul 10:24
3f5a4fa
Compare
Choose a tag to compare

Summary

The regression on the Parser utility introduced in the last release is resolved in this release. You can now access again the errors that made the validation fail using the cause property of the ParseError.

We continue improving our test coverage for the utility during the beta period and before the utility is considered generally available.

Changes

  • chore(deps): bump actions/dependency-review-action from 4.3.3 to 4.3.4 (#2772) by @dependabot
  • chore(deps): bump actions/setup-node from 4.0.2 to 4.0.3 (#2757) by @dependabot

🌟New features and non-breaking changes

  • feat(logger): custom function for unserializable values (JSON replacer) (#2739) by @arnabrahman

📜 Documentation updates

  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2766) by @dependabot
  • feat(logger): custom function for unserializable values (JSON replacer) (#2739) by @arnabrahman
  • chore(deps): bump @types/node from 20.14.9 to 20.14.10 (#2760) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.140 to 8.10.141 (#2761) by @dependabot
  • docs(parser): add section on how to test parser using decorator (#2755) by @am29d

🐛 Bug and hot fixes

  • fix(parser): links the error cause with ParseError (#2774) by @tusharf5

🔧 Maintenance

  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2766) by @dependabot
  • chore(deps-dev): bump typedoc from 0.26.3 to 0.26.4 in the typedoc group across 1 directory (#2759) by @dependabot
  • chore(deps): bump @types/node from 20.14.9 to 20.14.10 (#2760) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from cad3951 to cf26683 in /.devcontainer (#2756) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.140 to 8.10.141 (#2761) by @dependabot

This release was made possible by the following contributors:

@am29d, @arnabrahman, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot] and @tusharf5

v2.4.0

11 Jul 10:28
9f19407
Compare
Choose a tag to compare

Summary

This release improves: 1/ Logger by making it time zone aware, and 2/ Batch Processing which you can now customize to not throw an error when the entire batch of items fails to process.

We also dropped support for Node.js 16, and introduced support for Middy.js 5.x for functions using ES Modules.

🌟 ⭐ Thank you to @arnabrahman for the work on both the new features!

Change timezone in log timestamps

Docs

You can now change the timezone used for timestamps in your logs using the TZ environment variable, which is now taken in account when instantiating a new Logger instance. This is useful for when you want your logs to use a different timezone than the default UTC one.

carbon

Working with full batch failures

Docs

You can now configure the Batch Processing utility to not throw a FullBatchFailureError when all the records in the batch fail to process, by setting the throwOnFullBatchFailure option to false. This is useful when working with functions that handle batches with a small number of records, or when you use errors as a flow control mechanism.

carbon-24

End of support for Node.js 16

Docs

Three months ago we announced that we would stop supporting Node.js 16, and today we are removing support.
End of support does not impact existing functions and functions using versions of Powertools for AWS Lambda (TypeScript) up to version 2.3.0, however starting from this release we no longer guarantee compatibility with Node.js 16.

We recommend that you upgrade your existing Node.js 16 functions to Node.js 18 or later if you want to use Powertools for AWS Lambda (TypeScript) version 2.4.0 and above.

Changes

🌟New features and non-breaking changes

📜 Documentation updates

  • chore(layers): revert deploy Lambda layers in ap-south-2 and me-central-1 (#2762) by @dreamorosi
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2754) by @dependabot
  • feat(internal): support Middy.js 5.x (#2748) by @dreamorosi
  • feat(batch): add option to not throw FullBatchFailureError when the entire batch fails (#2711) by @arnabrahman
  • chore(deps): bump certifi from 2023.11.17 to 2024.7.4 in /docs (#2738) by @dependabot
  • chore(deps-dev): bump tsx from 4.16.0 to 4.16.2 (#2732) by @dependabot
  • chore(deps): bump the aws-sdk-v3 group across 1 directory with 9 updates (#2733) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.27 to 9.5.28 in /docs (#2728) by @dependabot
  • feat(logger): time zone aware timestamp in Logger (#2710) by @arnabrahman
  • feat(maintenance): drop support for Node.js 16.x (#2717) by @dreamorosi
  • chore(deps): bump esbuild from 0.21.5 to 0.23.0 (#2722) by @dependabot
  • chore(deps-dev): bump tsx from 4.15.7 to 4.16.0 (#2718) by @dependabot
  • chore(layers): deploy Lambda layers in ap-south-2 and me-central-1 (#2675) by @dreamorosi
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2712) by @dependabot
  • chore(layers): downgrade aws cdk to 2.145.0 (#2700) by @dreamorosi

🐛 Bug and hot fixes

🔧 Maintenance

This release was made possible by the following contributors:

@arnabrahman, and @dreamorosi

v2.3.0

27 Jun 15:10
b1cd636
Compare
Choose a tag to compare

Summary

This release improves Logger with (1) a more consistent handling of additional keys, and (2) a new method to reset keys. It also brings improvements to Parser with (1) more accurate API Gateway built-in schemas, and (2) better API reference.

We also fixed a bug with log sampling in Logger, and with the Idempotency decorator not preserving class scope.

🌟 ⭐ Thank you to @shdq for the work on the Logger improvements.

Working with additional keys in Logger

Docs

We have streamlined the experience for adding, removing, and resetting additional keys in Logger.

Temporary keys

Docs

You can add temporary keys to all future log messages via the appendKeys() method. This is helpful to contextualize log messages emitted within a specific function.

logger-append-keys

We have also added a new resetKeys() method to easily remove any temporary keys you have added, this is useful when you add multiple custom keys conditionally or when you emit canonical or wide logs.

logger-reset-keys

Persistent keys

Docs

You can now also persist keys across Lambda invocations by using the persistentKeys constructor option or the appendPersistentKeys() method.

These keys will now persist even if you call the resetKeys() method.

A common use case is to set keys about your environment or application version, so that you can easily filter logs in CloudWatch Logs.

logger-persistent-keys

The following properties and methods are now marked as deprecated and will be removed in the next major release:

  • persistentLogAttributes constructor option is replaced by persistentKeys
  • addPersistentLogAttributes() and setPersistentLogAttributes() methods are replaced by appendPersistentKeys()
  • removePersistentLogAttributes() method is replaced by removePersistentKeys()

New API Gateway built-in schemas in Parser

Docs

You can now use more accurate schemas for a fine grained validation and parsing, as well as improved type hinting, and code completion support.

API Gateway REST APIs:

  • [New] APIGatewayRequestAuthorizerEventSchema for request parameter-based Lambda authorizer (REQUEST authorizer)
  • [New] APIGatewayTokenAuthorizerEventSchema for token-based Lambda authorizer (TOKEN authorizer)
  • [Updated] APIGatewayProxyEventSchema for Lambda proxy integration

API Gateway HTTP APIs:

  • [New] APIGatewayRequestAuthorizerEventV2Schema for Lambda authorizer
  • [Updated] APIGatewayProxyEventV2Schema for Lambda proxy integration

parser-new-schemas

Improved API reference docs for Parser

Docs

You can now get details on built-in schemas and envelopes both within our online documentation (i.e. APIGatewayProxyEventSchema) and by hovering definitions without leaving your IDE.

Screenshot 2024-06-27 at 16 43 41

Changes

  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.7 to 3.0.9 (#2664) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.9 to 3.25.10 (#2656) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#2650) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.8 to 3.25.9 (#2651) by @dependabot

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

This release was made possible by the following contributors:

@am29d, @dreamorosi, and @shdq

v2.2.0

13 Jun 14:10
b35f9f1
Compare
Choose a tag to compare

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

Docs

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:

carbon-3

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.

carbon-2

Batch Processing

Skip processing failed group id messages of SQS FIFO queues on error

Docs

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.

carbon-4

Parser (beta)

Docs

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
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.6 to 3.0.7 (#2628) by @dependabot
  • chore(deps): bump actions/dependency-review-action from 4.3.2 to 4.3.3 (#2614) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.7 to 3.25.8 (#2610) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.5 to 3.0.6 (#2599) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.6 to 3.25.7 (#2593) by @dependabot
  • chore(idempotency): expiration timestamp rounded to the nearest second (#2574) by @arnabrahman
  • chore(deps): bump github/codeql-action from 3.25.5 to 3.25.6 (#2565) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.5 to 4.1.6 (#2548) by @dependabot
  • chore(ci): Adopt multi directory config for dependabot (#2532) by @daschaa
  • chore(parameters): Use AppConfig L2 constructs for integration tests (#2524) by @daschaa

🌟New features and non-breaking changes

  • feat(batch): add option to continue processing other group IDs on failure in SqsFifoPartialProcessor (#2590) by @arnabrahman
  • fix(idempotency): deep sort payload during hashing (#2570) by @arnabrahman

🌟 Minor Changes

📜 Documentation updates

  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2644) by @dependabot
  • docs(tracer): add ESM instructions to tracer usage docs (#2630) by @dreamorosi
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2626) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2619) by @dependabot
  • chore(deps-dev): bump tsx from 4.13.2 to 4.15.1 (#2629) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 8a87f05 to 96abcbb in /docs (#2615) by @dependabot
  • chore(deps-dev): bump tsx from 4.12.0 to 4.13.2 (#2620) by @dependabot
  • chore(deps-dev): bump tsx from 4.11.2 to 4.12.0 (#2612) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.25 to 9.5.26 in /docs (#2616) by @dependabot
  • chore(deps): bump @types/node from 20.14.1 to 20.14.2 (#2608) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2606) by @dependabot
  • chore(deps): bump @types/node from 20.14.0 to 20.14.1 (#2603) by @dependabot
  • feat(batch): add option to continue processing other group IDs on failure in SqsFifoPartialProcessor (#2590) by @arnabrahman
  • chore(deps): bump @types/node from 20.12.13 to 20.14.0 (#2601) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 11 updates (#2598) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2591) by @dependabot
  • chore(deps): bump @types/node from 20.12.12 to 20.12.13 (#2595) by @dependabot
  • chore(deps): bump ts-jest from 29.1.3 to 29.1.4 (#2586) by @dependabot
  • chore(deps): bump esbuild from 0.21.3 to 0.21.4 (#2583) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2578) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 5358893 to 8a87f05 in /docs (#2584) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.24 to 9.5.25 in /docs (#2585) by @dependabot
  • chore(deps-dev): bump tsx from 4.10.5 to 4.11.0 (#2575) by @dependabot
  • docs(batch): review API docs & README (#2562) by @dreamorosi
  • chore(deps): bump requests from 2.31.0 to 2.32.0 in /docs (#2563) by @dependabot
  • chore(deps): bump ts-jest from 29.1.2 to 29.1.3 (#2567) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 48d1914 to 5358893 in /docs (#2553) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.23 to 9.5.24 in /docs (#2554) by @dependabot
  • chore(deps): bump @types/aws-lambda from 8.10.137 to 8.10.138 (#2545) by @dependabot
  • chore(deps-dev): bump tsx from 4.10.3 to 4.10.5 (#2549) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2544) by @dependabot
  • chore(deps): bump esbuild from 0.21.2 to 0.21.3 (#2537) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 8ef47d7 to 48d1914 in /docs (#2533) by @dependabot
  • chore(deps): bump mkdocs-material from 9.5.22 to 9.5.23 in /docs (#2534) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2536) by @dependabot
  • chore(deps-dev): bump tsx from 4.10.2 to 4.10.3 (#2538) by @dependabot
  • chore(deps): bump @types/node from 20.12.11 to 20.12.12 (#2529) by @dependabot
  • chore(deps): bump esbuild from 0.21.1 to 0.21.2 (#2512) by @dependabot

🐛 Bug and hot fixes

🔧 Maintenance

  • chore(deps-dev): pin lerna to 8.1.2 (#2646) by @dreamorosi
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2644) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1637.0 to 2.1639.0 (#2638) by @dependabot
  • chore(deps-dev): bump prettier from 3.3.1 to 3.3.2 (#2633) by @dependabot
  • chore(deps): bump aws-xray-sdk-core from 3.6.0 to 3.9.0 (#2631) by @dependabot
  • chore(deps): bump the aws-cdk group across 1 directory with 2 updates (#2626) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1636.0 to 2.1637.0 (#2627) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2619) by @dependabot
  • chore(deps-dev): bump tsx from 4.13.2 to 4.15.1 (#2629) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1634.0 to 2.1636.0 (#2617) by @dependabot
  • chore(deps-dev): bump tsx from 4.12.0 to 4.13.2 (#2620) by @dependabot
  • chore(deps-dev): bump tsx from 4.11.2 to 4.12.0 (#2612) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1633.0 to 2.1634.0 (#2609) by @dependabot
  • chore(deps): bump @types/node from 20.14.1 to 20.14.2 (#2608) by @dependabot
  • chore(deps-dev): bump prettier from 3.3.0 to 3.3.1 (#2607) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2606) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1632.0 to 2.1633.0 (#2604) by @dependabot
  • chore(deps): bump @types/node from 20.14.0 to 20.14.1 (#2603) by @dependabot
  • chore(deps): bump @types/node from 20.12.13 to 20.14.0 (#2601) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 11 updates (#2598) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from bbd5e0f to cad3951 in /.devcontainer (#2592) by @dependabot
  • chore(deps): bump the aws-sdk group across 1 directory with 9 updates (#2591) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1628.0 to 2.1631.0 (#2596) by @dependabot
  • chore(deps): bump @types/node from 20.12.12 to 20.12.13 (#2595) by @dependabot
  • chore(deps): bump ts-jest from 29.1.3 to 29.1.4 (#2586) by @dependabot
  • chore(deps): bump esbuild from 0.21.3 to 0.2...
Read more

v2.1.1

14 May 16:23
cc10139
Compare
Choose a tag to compare

Summary

This patch release brings bug fixes to the Parser and a deprecation notice to the Tracer utility.

Parser

In response to customer reports we have applied a number of fixes on some of the built-in schemas for the Parser utility.

Specifically, the queryStringParameters, multiValueQueryStringParameters, and body fields in the APIGatewayProxyEventSchema have been converted to .nullable() to account for them being set to null in some types of requests.

Likewise, the etag field in the S3EventNotificationEventBridgeDetailSchema has been made .optional() since it's not included when an object being deleted on S3 sends a notification via Amazon EventBridge.

Finally, the principalOrgId and cognitoIdentity fields in the APIGatewayProxyEventV2Schema have been converted to .nullish().

We want to thank everyone who has taken the time to test the first beta for the Parser utility and especially those who have also reported issues they might have encountered. Thank you for making Powertools for AWS Lambda better for everyone!

Tracer

In March 2024, AWS announced that AWS SDK for JavaScript v2 will reach end-of-support in September 8, 2025. In response to this announcement, and to align with the warnings already being emitted by the AWS SDK, with this release we are marking the captureAWS and captureAWSClient methods as deprecated.

This announcement does not impact the methods and you are free to continue using them. The deprecation tag serves only as a gentle nudge to consider a migration to the newer AWS SDK for JavaScript v3 which can be instrumented via the captureAWSv3Client.

The two methods we are marking as deprecated today will be removed in the next major release, which as of today has no planned date.

Acknowledgements

Congratulations to @blytheaw for getting their first PR merged 🎉 and thanks also to @arnabrahman for another successful contribution 🙏!

Workshop

For those of you wanting to get a deeper introduction to Powertools for AWS Lambda, you can now try our official self-paced workshop titled “Accelerate your serverless journey with Powertools for AWS Lambda”.

Miscellaneous

We are happy to also share that we have restarted working on the RFC process for the upcoming Event Handler utility. Last week we have published a first decision log on our direction in terms of routing implementation where we have decided to move forward with a new implementation rather than taking a 3rd party library as dependency. The next step will be to finalize the main RFC for how the API and Developer Experience (DX) for the utility will look like.

In parallel, we have started refreshing the API docs for the utilities starting with the Commons utility, which is mainly used internally by other utilities. The goal for this workstream is to standardize the docstrings and contextual documentation so that you can have more details on what different public APIs do.

Changes

  • chore(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 (#2506) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.4 to 3.25.5 (#2514) by @dependabot
  • chore(tracer): mark captureAWS & captureAWSClient functions as deprecated (#2508) by @arnabrahman
  • chore(deps): bump github/codeql-action from 3.25.3 to 3.25.4 (#2495) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.4 to 4.1.5 (#2489) by @dependabot
  • chore(docs): fix update layer arn for cdk (#2487) by @am29d
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.4 to 3.0.5 (#2475) by @dependabot
  • chore(deps): bump actions/dependency-review-action from 4.2.5 to 4.3.2 (#2460) by @dependabot
  • chore(deps): bump actions/download-artifact from 4.1.6 to 4.1.7 (#2439) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.3 to 4.1.4 (#2440) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.2 to 3.25.3 (#2445) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.1 to 3.25.2 (#2425) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.2 to 4.3.3 (#2426) by @dependabot
  • chore(deps): bump actions/download-artifact from 4.1.5 to 4.1.6 (#2424) by @dependabot
  • chore(maintenance): update labels in automation (#2419) by @dreamorosi
  • chore(deps): bump actions/checkout from 4.1.2 to 4.1.3 (#2412) by @dependabot
  • chore(deps): bump actions/download-artifact from 4.1.4 to 4.1.5 (#2404) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.1 to 4.3.2 (#2405) by @dependabot
  • chore(deps): bump github/codeql-action from 3.25.0 to 3.25.1 (#2385) by @dependabot

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(parser): set APIGatewayProxyEventSchema body and query string keys to be nullable (#2465) by @blytheaw
  • fix(parser): lambda function url cognitoIdentity and principalOrgId nullable (#2430) by @am29d
  • fix(parser): set etag optional for delete object notifications (#2429) by @am29d

🔧 Maintenance

  • chore(deps-dev): bump tsx from 4.9.3 to 4.10.2 (#2510) by @dependabot
  • chore(deps): bump the aws-sdk group with 11 updates (#2509) by @dependabot
  • chore(deps-dev): bump lerna from 8.1.2 to 8.1.3 (#2513) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1616.0 to 2.1617.0 (#2507) by @dependabot
  • chore(deps-dev): bump zod from 3.23.6 to 3.23.8 (#2504) by @dependabot
  • chore(deps): bump the aws-sdk group with 9 updates (#2502) by @dependabot
  • chore(deps): bump the aws-cdk group with 2 updates (#2503) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1614.0 to 2.1616.0 (#2501) by @dependabot
  • chore(deps): bump vscode/devcontainers/javascript-node from ec1e123 to bbd5e0f in /.devcontainer (#2496) by @dependabot
  • chore(deps): bump @types/node from 20.12.10 to 20.12.11 (#2497) by @dependabot
  • chore(deps): bump esbuild from 0.21.0 to 0.21.1 (#2500) by @dependabot
  • chore(deps): bump esbuild from 0.20.2 to 0.21.0 (#2490) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1613.0 to 2.1614.0 (#2492) by @dependabot
  • chore(deps): bump @types/node from 20.12.9 to 20.12.10 (#2491) by @dependabot
  • chore(deps-dev): bump tsx from 4.9.0 to 4.9.3 (#2480) by @dependabot
  • chore(deps-dev): bump aws-sdk from 2.1612.0 to 2.1613.0 (#2481) by @dependabot
  • chore(deps): bump @types/node from 20.12.8 to 20.12.9 (...
Read more