-
Notifications
You must be signed in to change notification settings - Fork 4k
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): unable to use Trigger for more than one function #22110
Labels
@aws-cdk/triggers
Related to the triggers package
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
p2
Comments
cecheta
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Sep 19, 2022
4 tasks
peterwoodworth
added
p2
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Sep 19, 2022
Thanks for the report and PR, we'll try to take a look at it soon 🙂 |
mergify bot
pushed a commit
that referenced
this issue
Nov 30, 2022
Closes #22110 This PR updates the custom resource provider in the Trigger construct to use `addToRolePolicy` to add new statements to the IAM policy, rather than the constructor, so it can be used to trigger more than one lambda function. Also adds a one-minute retry in the custom resource provider lambda function as IAM policy changes take some time to propagate. Also refactored tests to increase coverage. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
brennanho
pushed a commit
to brennanho/aws-cdk
that referenced
this issue
Dec 9, 2022
Closes aws#22110 This PR updates the custom resource provider in the Trigger construct to use `addToRolePolicy` to add new statements to the IAM policy, rather than the constructor, so it can be used to trigger more than one lambda function. Also adds a one-minute retry in the custom resource provider lambda function as IAM policy changes take some time to propagate. Also refactored tests to increase coverage. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
brennanho
pushed a commit
to brennanho/aws-cdk
that referenced
this issue
Jan 20, 2023
Closes aws#22110 This PR updates the custom resource provider in the Trigger construct to use `addToRolePolicy` to add new statements to the IAM policy, rather than the constructor, so it can be used to trigger more than one lambda function. Also adds a one-minute retry in the custom resource provider lambda function as IAM policy changes take some time to propagate. Also refactored tests to increase coverage. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
brennanho
pushed a commit
to brennanho/aws-cdk
that referenced
this issue
Feb 22, 2023
Closes aws#22110 This PR updates the custom resource provider in the Trigger construct to use `addToRolePolicy` to add new statements to the IAM policy, rather than the constructor, so it can be used to trigger more than one lambda function. Also adds a one-minute retry in the custom resource provider lambda function as IAM policy changes take some time to propagate. Also refactored tests to increase coverage. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/triggers
Related to the triggers package
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
p2
Related to #19272
Describe the bug
When using the
Trigger
construct, it only has permissions to invoke a single lambda function, meaning it cannot invoke more than one without receiving an access denied error.Expected Behavior
Both lambda functions are invoked.
Current Behavior
Access denied exception
Reproduction Steps
Possible Solution
The CustomResourceProvider should use
addToRolePolicy
rather than creating the policy in the constructorAdditional Information/Context
No response
CDK CLI Version
2.42.0
Framework Version
No response
Node.js Version
16.15.0
OS
Mac OS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: