-
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
[s3-deployment] BucketDeployment not reading role from Role.fromRoleArn #9989
Comments
What do you mean have no affect? The way it should work is by adding an Is that policy not being created? Are you getting errors during deployment? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Because of corporate policies, creating roles at runtime is not allowed (which cdk is doing ) All roles are reviewed and approved before they can be used. For now we found a work around mentioned here. #3684 |
@mukeshchauhan, just to clarify a couple of things first: when you provide a role to Now, to your problem: I get it. It would make more sense if, when presented with a custom role, it didn't attach any policy to it. As part of its contract, |
@otaviomacedo we noticed this today at work. I also feel like providing a custom role should prevent a new one being made. I've been thinking but I can't think of a use case where adding extra permissions would make sense for a S3 Deployment. Given we're not in control of the code, what more permission could it need than the S3 access it's already making? FWIW we worked around it with some disgusting patching of the bucket passed in to make Bucket.fromBucketArn(this, "nulledReadWrite", filesBucket.bucketArn).grantReadWrite = (() => {
console.trace('nulled out grantReadWrite() will have no effect');
}) as any; |
Ok, what I said above is not entirely correct. I wasn't aware that there is a boolean property, Feel free to reopen if you have additional questions. |
|
Perfect thank you! |
I also found, that if you are passing in a role, you can use the |
Role.fromRoleArn
have no affect when provided toBucketDeployment
via propsIssue
Instantiating
BucketDeployment
with providedRole.fromRoleArn
have no affect, approval for updating the policy is presented with the same permissions that are in the existing role. Due to corporate IAM limitations, we cannot approve the IAM changes on fly and have to use existing roles.Environment
Code Snippet
The text was updated successfully, but these errors were encountered: