Skip to content

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #6551

Summary

Changes

Add AppSync Events Resolver

User experience

from __future__ import annotations

from typing import TYPE_CHECKING, Any

from aws_lambda_powertools.event_handler import AppSyncEventsResolver

if TYPE_CHECKING:
    from aws_lambda_powertools.utilities.typing import LambdaContext

app = AppSyncEventsResolver()


@app.on_publish("/default/channel")
def handle_channel1_publish(payload: dict[str, Any]):
    # Process the payload for this specific channel
    return {
        "processed": True,
        "original_payload": payload,
    }


def lambda_handler(event: dict, context: LambdaContext):
    return app.resolve(event, context)

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner April 24, 2025 21:54
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation event_handlers tests labels Apr 24, 2025
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 24, 2025
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Apr 24, 2025
Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@github-actions github-actions bot added the feature New feature or functionality label Apr 24, 2025
Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

1 similar comment
Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@leandrodamascena leandrodamascena self-assigned this Apr 24, 2025
Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@leandrodamascena leandrodamascena linked an issue Apr 24, 2025 that may be closed by this pull request
2 tasks
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Apr 24, 2025
Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Apr 24, 2025
Copy link

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 94.68085% with 15 lines in your changes missing coverage. Please review.

Project coverage is 96.11%. Comparing base (0939463) to head (1b5e05c).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...ols/event_handler/events_appsync/appsync_events.py 90.90% 8 Missing and 2 partials ⚠️
...a_powertools/event_handler/events_appsync/types.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6558      +/-   ##
===========================================
- Coverage    96.16%   96.11%   -0.05%     
===========================================
  Files          243      253      +10     
  Lines        11842    12086     +244     
  Branches       886      898      +12     
===========================================
+ Hits         11388    11617     +229     
- Misses         356      369      +13     
- Partials        98      100       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leandrodamascena leandrodamascena merged commit 970d97e into develop Apr 24, 2025
12 of 14 checks passed
@leandrodamascena leandrodamascena deleted the appsync/feat-events branch April 24, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers feature New feature or functionality size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: AWS AppSync Event resolver

2 participants