Determine Identity of IAM user executing the CDK deploy
0
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.
asked a month ago24 views
1 Answers
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
answered a month ago
Relevant questions
Can I get API Keys for a Service Role?
asked 6 months agoCan I limit the type of instances that data scientists can launch for training jobs in SageMaker?
Accepted Answerasked 2 years agoDeploy updated container to existing CDK stack
Accepted Answerasked 3 years agoIAM Permission Boundary does not prevent CDK escalating privilege access?
Accepted Answerasked 2 months agoHow can I add 3P identity providers to the Identity & Auth feature on AWS GameKit?
asked 3 months agoThe problem of updating the apigateway stage in aws cdk.
asked 4 months agoAWS CDK - how can I retrieve the ID of my primary network interface?
asked 3 months agoChange Access type for an IAM user
asked 5 years agoLimit which IAM roles can be attached to an EC2 instance by different IAM users
asked 7 months agoDetermine Identity of IAM user executing the CDK deploy
asked a month ago