[Python] In AWS CDK, how can we get the arn from the role that is created along with an...

Discussão em 'Python' iniciado por Stack, Fevereiro 13, 2025.

  1. Stack

    Stack Membro Participativo

    To be explicit, the code uses the following class: aws_cdk.aws_sso import CfnPermissionSet with the inline_policy argument.

    After it's deployed, there is a role that matches that inline_policy. I'm looking for a way to use that role arn within the stack, to allow me to set it as a principal in another role for a sts:AssumeRole grant.

    I've read somewhere that getting the ref of the CfnPermissionSet would yield an arn that I can use some string replace over to get the role, but that does not work. The automatically generated ids don't match between the PermissionSet arn and the role arn.

    Continue reading...

Compartilhe esta Página