Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add EventHandler for triggering asynchronous execution #5627

Open
1 of 2 tasks
sinofseven opened this issue Nov 22, 2024 · 1 comment
Open
1 of 2 tasks
Labels
feature-request feature request triage Pending triage from maintainers

Comments

@sinofseven
Copy link

Use case

I would like to use monolithic Lambda as a mechanism to build asynchronous execution Lambda Functions.

Python Runtime's SnapStart charges a cache fee for each version of the Lambda Function.
I believe that reducing the number of Lambda Functions created by Monolithic Lambda would be a useful cost saving measure.

While it is easy to build monolithic Lambda with API Gateway's backend Lambda because of EventHandler, it is not easy to build monolithic Lambda for asynchronous Lambda execution.
I would like to create a new EventHandler to facilitate this.

Solution/User Experience

app = AsynchronousTriggerResolver()


@app.sns("<String to identify>")
def process_sns_01():
    pass


@app.sns("<String to identify>")
def process_sns_02():
    pass


@app.event_bridge("<String to identify>")
def process_event_bridge():
    pass


@app.cloudwatch_logs("<String to identify>")
def process_cloudwatch_logs():
    pass


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

I am thinking that it would be good if we could use it like an EventHandler for API Gateway.

Alternative solutions

Acknowledgment

@sinofseven sinofseven added feature-request feature request triage Pending triage from maintainers labels Nov 22, 2024
Copy link

boring-cyborg bot commented Nov 22, 2024

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request triage Pending triage from maintainers
Projects
Development

No branches or pull requests

1 participant