Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 25, 2025

Bumps @aws-lambda-powertools/logger from 2.18.0 to 2.19.0.

Release notes

Sourced from @​aws-lambda-powertools/logger's releases.

v2.19.0

Summary

We are excited to announce a new integration for Event Handler to work with AWS AppSync Events APIs. This utility provides a structured way to handle AppSync real-time events through dedicated handler methods, automatic routing, and flexible configuration options.

We have also improved the experience for customers who are using the log buffering feature in Logger with AWS Lambda’s Advanced Logging Controls (ALC) enabled by emitting a log when the ALC log level is less verbose than the log level in the buffering configuration, which prevents data loss.

⭐ A big thank you to @​jorovipe97 and @​ConnorKirk for their contributions to this release!

New Event Handler for AppSync Events

Docs

The new AppSyncEventsResolver is designed to streamline working with AWS AppSync real-time APIs by:

  • Handling publish and subscribe events with dedicated handler methods
  • Routing events automatically based on namespace and channel patterns
  • Supporting wildcard patterns for catch-all handlers
  • Controlling event aggregation for batch processing
  • Implementing graceful error handling

Handling publish events

You can register handlers for publish events using the onPublish method and specifying a pattern for the namespace and channels. This is useful when you want to modify payload content, persist the message in a database, or apply business logic and conditionally filter messages out.

carbon

Handling subscribe events

You can use the onSubscribe() method to process subscription requests before allowing clients to connect to specific channels. This enables authorization checks and subscription filtering based on client context or payload attributes, as well as subscription tracking, for example:

carbon-2

Working with aggregated processing

You can use the aggregate parameter when registering an onPublish handler to process multiple events together as a batch. This is useful when you need to optimize database operations, or want to have full control over how the messages are processed.

carbon-3

AppSyncEventsResolver FAQs

Q: Can I handle different types of events from the same channel? A: Yes, you can register different handlers for publish and subscribe events on the same channel. Q: How does handler precedence work with wildcard patterns? A: More specific patterns take precedence over wildcards. For example, /default/channel1 will be chosen over /default/, which will be chosen over /. Q: What happens when an exception occurs in my handler? A: With individual processing (aka aggregate disabled), the utility catches exceptions and includes them in the response for the specific event while still processing other events. You can also explicitly raise an UnauthorizedException exception to reject the entire request. Q: Does the order of async event processing matter? A: No, AppSync Events doesn't guarantee delivery order. As long as each response includes the original event ID, AppSync processes them correctly regardless of order. Because of this, when aggregate is disabled, we call your handlers all at once. Q: Can I process multiple events as a batch?

... (truncated)

Changelog

Sourced from @​aws-lambda-powertools/logger's changelog.

2.19.0 (2025-04-24)

Bug Fixes

  • logger: warn customers when the ALC log level is less verbose than log buffer (#3834) (04f64ce)
  • logger: warn only once on ALC log level mismatch (#3816) (1e330b3)
  • parser: Make Kafka key property optional (#3855) (68fa1eb)

Features

Commits
  • 53f0e40 chore(ci): bump version to 2.19.0 (#3859)
  • 01f8a68 feat(event-handler): AppSync Events resolver (#3858)
  • 68fa1eb fix(parser): Make Kafka key property optional (#3855)
  • 28841fe chore: update cdk output dir (#3854)
  • 114188c docs: Update metrics docs to mention correct POWERTOOLS_METRICS_DISABLED vari...
  • 316fee1 chore(deps-dev): bump typedoc from 0.28.2 to 0.28.3 in the typescript group a...
  • 10b78c4 chore(deps-dev): bump the vitest group across 1 directory with 2 updates (#3845)
  • d43adc8 chore(deps-dev): bump zod from 3.24.2 to 3.24.3 (#3839)
  • 5e00d45 chore(deps): bump the aws-cdk group across 1 directory with 3 updates (#3838)
  • e3206fc chore(deps): bump squidfunk/mkdocs-material from sha256:23b69789b1dd836c53ea2...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@aws-lambda-powertools/logger](https://github.com/aws-powertools/powertools-lambda-typescript) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-typescript/blob/main/CHANGELOG.md)
- [Commits](aws-powertools/powertools-lambda-typescript@v2.18.0...v2.19.0)

---
updated-dependencies:
- dependency-name: "@aws-lambda-powertools/logger"
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 25, 2025
Copy link

@eps-autoapprove-dependabot eps-autoapprove-dependabot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this pull request because it includes a patch or minor update

@eps-autoapprove-dependabot eps-autoapprove-dependabot bot merged commit d886410 into main Apr 25, 2025
2 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/aws-lambda-powertools/logger-2.19.0 branch April 25, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants