user12076139
user12076139

Reputation:

How to get the ARN Value of IAM Role in AWS

I am trying to run below AWS Cli to get the Role description but i want to filter this command to get ARN. I couldnt get the value but receive "null"

command :


can you provide the correct command to fetch the output of ARN Value

Upvotes: 3

Views: 11610

Answers (1)

Marcin
Marcin

Reputation: 238527

Role is a json object, not a list:

aws iam get-role --role-name cfnrole --query 'Role.[RoleName, Arn]' --output text

Upvotes: 3

Related Questions