zappa schedule doesnt work when event function string too long #1036
Labels
auto-closed
[Bot] Closed, details in comments
next-release-candidate
no-activity
[Bot] Closing soon if no new activity
Context
Running below zappa_settings.json won't work for Cloudwatch event -> lambda, because the function name is too long and lambda tries to call "aws.lambda_service.pipeline.core.lambda_update_price_col.ma" instead of "aws.lambda_service.pipeline.core.lambda_update_price_col.main", since zappa handler looks at the resource name of the cloud watch event, which has a max char limit
Offending code is here:
Zappa/zappa/handler.py
Line 385 in 89e9917
Expected Behavior
Should work regardless of how long the name. We can't refactor our codebase as there's too many files, so we have to rename our files to be shorter if we want to use zappa schedule. For now, most of the devs just stopped using zappa and manually create the lambda / cloudwatch event which is not ideal.
Actual Behavior
Possible Fix
Fix is probably to pass the entire function string, instead of relying on the "resources" field from cloudwatch event / eventbridge:
The text was updated successfully, but these errors were encountered: