-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[custom-resources] allow for no policy to be specified #13232
Comments
I guess I don't mind that field being optional. In the mean time, you can use |
@rix0rrr Very useful tip. Thank you! |
@rix0rrr Still opened? |
@rix0rrr Can I give a try for this? |
@rix0rrr - I have used |
Hello, I am also having the same issue with CDK 2.17.0. Did anyone find a workaround for this? I currently have a role with 60+ replicated inline policies and almost reached the characters limit. |
#19114 might partially help Update: tested this morning and the AwsCustomResource policy is not minified. |
Experiencing the same problem. I need to provide an immutable role to No workaround available as far as I can see, it always tries to attach a policy if |
…tes immutable roles (#20966) This fixes #13232 by making the `policy` property optional in `AwsCustomResource` as long as `role` is specified. Previously, if an immutable role was provided to `AwsCustomResource`, an IAM policy was still created with a reference to the provided role. This resulted in a call to `iam:PutRolePolicy` to update the immutable role when deploying the stack. The underlying motivation for using an immutable role here is to support a restricted corporate environment where IAM role changes are not allowed. ---- ### 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*
|
…tes immutable roles (aws#20966) This fixes aws#13232 by making the `policy` property optional in `AwsCustomResource` as long as `role` is specified. Previously, if an immutable role was provided to `AwsCustomResource`, an IAM policy was still created with a reference to the provided role. This resulted in a call to `iam:PutRolePolicy` to update the immutable role when deploying the stack. The underlying motivation for using an immutable role here is to support a restricted corporate environment where IAM role changes are not allowed. ---- ### 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*
I do not have the ability to modify roles and the CDK assumes I do for an
AwsCustomResource
. I can specify the execution role for the custom resource Lambda, but I have to specify a policy, andcdk deploy
fails for me because I don't have access to modify the execution role with the new policy. I would expect for policy to be optional if role is specified. I am in a corporate setting where permissions are "locked down" and roles exist but can not be modified.Reproduction Steps
What did you expect to happen?
I do not want to modify the execution role.
What actually happened?
The execution role is modified.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: