-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
InvokePermission not automatically added to Lambda when triggered via Cloudwatch Rule #555
Labels
bug
This issue is a bug.
Comments
eladb
pushed a commit
that referenced
this issue
Aug 14, 2018
Lambda permissions granted when it was added as an event rule target did not include "SourceArn" as required. This allowed any event rule to trigger the function, and also did not show as a trigger in the AWS Lambda console. Added a integration test to verify. BREAKING CHANGE To fix this, we needed to modify `IEventRuleTarget` to pass the ARN of the rule and a unique ID to the registered target in order to allow it to specify the Source ARN. This required fixing all existing event rule targets (which, so far would return a role to be assumed by CWE, so the source ARN was not required). Fixes #555
eladb
pushed a commit
that referenced
this issue
Aug 14, 2018
Lambda permissions granted when it was added as an event rule target did not include "SourceArn" as required. This allowed any event rule to trigger the function, and also did not show as a trigger in the AWS Lambda console. Added a integration test to verify. BREAKING CHANGE To fix this, we needed to modify `IEventRuleTarget` to pass the ARN of the rule and a unique ID to the registered target in order to allow it to specify the Source ARN. This required fixing all existing event rule targets (which, so far would return a role to be assumed by CWE, so the source ARN was not required). Fixes #555
I think this is also an issue for an The IoT rule is created but does not trigger the lambda. After clicking "edit" on the IoT rule and saving the "changes", the function policy in Lambda is updated which allows the rule to trigger. I guess it's because there is not IoT event in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying wire up an EventRule as an input/trigger to a Lambda function but the permission to allow Cloudwatch to invoke the Lambda is not being added automatically.
e.g. would expect the following to add the permission automatically but doesn't
Have to add this code in to get the permission added:
Output from cdk synth shows this:
@eladb suspected in a gitter chat this was because the sourceArn is missing.
The text was updated successfully, but these errors were encountered: