-
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
Multiple event triggers generate duplicate copies of the first event trigger defined #1319
Comments
@philvarner I have a similar problem in which I have multiple events to the same S3 bucket with different key filters, but for me it does not duplicate the trigger, it just ignores the second one. Did you manage to solve your problem ? |
I worked around it by just defining one S3 event listener and then switching on what type it was in the lambda handler code. |
Experiencing the same :-/ |
It seems that the problem is caused by this garnaat/kappa#124 |
Does has anyone find the solutions for this? I have the same problem with Kinesis Stream. I have two events sources listening the same stream but only one works. |
I am still seeing this issue as well I would like to create multiple events on an s3 bucket based on different prefix. This can be done manually but when I try to do this via Zappa the first event is registered but all subsequent events are ignored
I would prefer not to have to do this manually when updating the function any suggestions or timeframe for a fix? |
This is affecting me too, and surely many other people, I have different events on the same bucket, with different prefix/suffixes, and can only use one.. does anyone have a manual workaround ? and is there any timeframe to a fix ? also this issue title does not reflect the problem, issues that have done, have been closed in favour of this Perhaps something like
|
Any solution on this, I am also affected by this. |
Just encountered the same thing - I guess I had just kind of assumed that this would all work with Zappa, but at least I've found it before attempting a deployment live ;) . In my case:
Existing function event configuration for I'm assuming this can be worked around in the AWS console, manually, on the bucket in question, without upsetting anything in either deployment. If not, might have to find something else to deploy both functions :( . |
I believe this is still a problem, deploying two functions to respond to the same event on a single bucket is not possible. |
Whoops, this just came up in a google search. Thanks for the heads up. |
Context
When I define event triggers like the following (contrived from my real usage):
I get the following output on update:
However, what actually happens is I get two event triggers defined on the lambda for the first event trigger definition. The number of event triggers created is equal to the number of event triggers defined (rather than the number of deploys).
This may be caused by my adding the second even definition after the initial deploy. It may work correctly if both events are defined when the zappa project is first deployed, but I have not tested that scenario.
Expected Behavior
Two event triggers are created according to my definitions.
Actual Behavior
Two event triggers are created, both matching the first event trigger definition.
Possible Fix
I haven't debugged this very far, but my guess is that the problem lies in the logic in
zappa.utilitites.add_event_source, where there's a comment "# TODO: Detect changes in config and refine exists algorithm".
Steps to Reproduce
See above example of event definitions.
Your Environment
pip freeze
:argcomplete==1.9.2
asn1crypto==0.24.0
attrs==17.3.0
aws-xray-sdk==0.95
base58==0.2.4
boto==2.48.0
boto3==1.5.6
botocore==1.8.20
cairocffi==0.8.0
CairoSVG==2.1.2
certifi==2017.11.5
cffi==1.11.2
cfn-flip==1.0.0
chardet==3.0.4
click==6.7
cookies==2.2.1
coverage==4.4.2
credstash==1.14.0
cryptography==2.0.3
cssselect2==0.2.1
defusedxml==0.5.0
docker==2.7.0
docker-pycreds==0.2.1
docutils==0.14
durationpy==0.5
future==0.16.0
hjson==3.0.1
html5lib==1.0.1
idna==2.6
invoke==0.22.0
Jinja2==2.10
jmespath==0.9.3
jsondiff==1.1.1
jsonpickle==0.9.5
kappa==0.6.0
lambda-packages==0.19.0
MarkupSafe==1.0
mock==2.0.0
moto==1.1.25
olefile==0.44
pbr==3.1.1
pendulum==1.3.2
Pillow==4.3.0
placebo==0.8.1
pluggy==0.6.0
py==1.5.2
pyaml==17.12.1
pycodestyle==2.3.1
pycparser==2.18
PyPDF2==1.26.0
Pyphen==0.9.4
pytest==3.3.1
pytest-cov==2.5.1
python-dateutil==2.6.1
python-slugify==1.2.4
pytz==2017.3
pytzdata==2017.3.1
PyYAML==3.12
reportlab==3.4.0
requests==2.18.4
requests-mock==1.4.0
s3transfer==0.1.12
six==1.11.0
timeout-decorator==0.4.0
tinycss2==0.6.1
toml==0.9.4
tqdm==4.19.1
troposphere==2.1.2
tzlocal==1.5.1
Unidecode==0.4.21
urllib3==1.22
webencodings==0.5.1
websocket-client==0.45.0
Werkzeug==0.12
wrapt==1.10.11
wsgi-request-logger==0.4.6
xmltodict==0.11.0
zappa==0.45.1
zappa_settings.py
: example aboveThe text was updated successfully, but these errors were encountered: