-
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
(IAM): (Adding multiple AccountPrincipal to a role) #27017
Comments
Aren't these statements identical in functionality? I'm not sure looking at the policies why the second one is problematic |
My bad, you're correct. On a closer look the join statement does produce the same principal. The |
|
Although these are identical behaviors at runtime, we could run into character limits (2048) more easily with cdk v2. We ran across this issue when migrating from v1 to v2 since we had a large list of account ids that were previously under 1 statement, but now separated into their own. Is there any way we can override this behavior ? |
For future reference, I was able to get around with a custom principal:
|
Describe the bug
Through the console, I can add multiple principals by specifying the account ids as a list.
How do I achieve this via the CDK? I tried using
CompositePrincipal
but later realized it only acceptsServicePrincipal
as parameters.Expected Behavior
Expected
cdk synth
to produce output like when modifying through console above. IfCompositePrincipal
does not take inAccountPrincipal
it should error out during synth.Current Behavior
When specifying account Id within
CompositePrincipal
I get the following oncdk synth
without any errors.Reproduction Steps
Use
AccountPrincipal
as argument toCompositePrincipal
.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.87.0
Framework Version
No response
Node.js Version
v16.3.0
OS
Amazon Linux
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: