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.

preguntada hace 2 años1005 visualizaciones
1 Respuesta
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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas