Determine Identity of IAM user executing the CDK deploy

1

I would like to get the identity of the IAM user that is executing the CDK deploy so that I can make that user one of the admins for the KMS Key the CDK app creates.

When using the AWS CLI we can run "$ aws sts get-caller-identity" to determine what IAM user is executing the command. What is the equivalent of doing that in the CDK?

Thank you.

demandé il y a 2 ans1004 vues
1 réponse
0

From https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-environment: "CDK uses credentials from the same sources files as other AWS tools and SDKs, including the AWS Command Line Interface" so that same command will get what you need. Note that you can also specify a role by passing it with -r

AWS
SeanM
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions