Skip to content

Feature request: Add EventHandler for triggering asynchronous execution #5627

Description

@sinofseven

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

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    Status
    Coming soon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions