-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Cannot create triggers for SNS events #225
Comments
Damn, I was afraid of this. Yeah, this is directly related to: garnaat/kappa#81 I'd rather have this fixed in Kappa, what we're doing is pretty dirty already, and I'd rather not have to check the the event type. Thanks for digging into this one and surfacing this. Not sure how to proceed. It basically means getting those four event source types patched in Kappa, getting a PR merged and then having them update the deployed version with a Zappa version bump in tandem. |
Somebody has already submitted a reasonable PR for this, hopefully it'll land upstream soon. |
Pushed a temporary workaround to master. |
@Miserlou I've just test it, and the deployment works fine using master branch. But I seems that the Sns events are not processed correctly by the lambda handler.
The 'configurationId' is a specific property of the s3 events. The Sns events don't have it. I guess this should be more generic in order to work with other trigger sources, or handling each event type in a particular way. |
Yeah, very big + 1. Related: http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html |
Related: garnaat/kappa#82 |
There is an error running zappa schedule when SNS event sources are configured:
In zappa_settings.json:
Looking at the code it seems that the problem is how the arn is split and used in Kappa event source:
In S3EventSource.add:
'LambdaFunctionArn': '%s:%s' % (function.arn, function._context.environment),
But in SNSEventSource.add:
Endpoint=function.arn)
As the value of 'arn' is split in order to work with the S3EventSource it doesn't work fine with SNS cause it expects the full arn value.
I don't know if it should be fixed in Kappa or in Zappa. For me is strange the way Kappa is building the 'LamdbaFuncionArn' in S3EventSource using the context.environment...
The text was updated successfully, but these errors were encountered: