-
Notifications
You must be signed in to change notification settings - Fork 24
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
Triggers duplicated on each deploy #66
Comments
Interesting, I can't reproduce this without setting -DforceUpdate=true. The log output (Created CloudWatch Events...) is misleading, it's not creating a new one, just updating the existing one. You only have one CloudWatch event rule pointed at your lambda function. |
Turns out, only the info on the lambda trigger tab is wrong. The lambda is indeed triggered only once per event. The info is correct on the CloudWatch rule page, and with the CLI So it's possibly just a display issue on the AWS side. That said, maybe the issue could be mitigated by checking on deploy whether the event has changed, and skip the update if it is unchanged? |
The code does actually check to see if the event has been changed. It compares the event rule name, the schedule expression and the description. If any of these have been changed, it updates the event rule. |
@jeanblanchard Can I close this issue? |
After further investigating, it appears that, in After updating the rule itself, a new permission is added for the rule (the permissions are not cleaned up, that I could see). This is what is causing the duplicated "events" that I see in the triggers tab. I could confirm this by manually removing the duplicated permissions using the CLI. PS: I would create a PR for this, now that I have the project sitting in my IDE, but I don't really understand how the keepAlive works (or what the keepalive check is doing at all in the schedule rule check), so I wouldn't want to break everything... |
OK thanks for your investigation, I'll remove the keep alives from my configuration and retest. |
Resolved in 2.2.2 |
Using version 2.2.1 or 2.2.0
My lambda is configured with a "CloudWatch Events - Schedule" trigger.
Each time I run
mvn lambda:deploy-lambda
, a new trigger is added to the lambda, pointing to the same event.Configuration details (extract):
Maven logs
The text was updated successfully, but these errors were encountered: