Description
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
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog