I have a bunch AWS resource ARNs. I can easily write a switch/case statement on the namespace of the ARN and call the appropriate describeXYZ
method on the correct AWS API class to get the resource details. But is there a way of taking any arbitrary ARN and getting a description for it? Something like aws.describeResource({arn:myArn}, callback)
?
To get an ARN from the AWS Management Console, navigate to the resource you want an ARN for, and view the details for that resource. For example, you can get the ARN for a DB instance from the Configuration tab of the DB instance details, as shown following.
The following tables list the Amazon Resource Names (ARNs) for API Gateway resources. To learn more about using ARNs in AWS Identity and Access Management policies, see How Amazon API Gateway works with IAM and Control access to an API with IAM permissions.
Sign in to the AWS Management Console and open the AWS Config console at https://console.aws.amazon.com/config/ . On the Resource inventory page, specify the search options for the resources that you want to look up: Resource category – Choose all resource categories or narrow results to only AWS Resources.
I don't know what description exactly you are looking for, I don't know of the existence of such service. However, the ARN itself includes some information that could or could not be helpful to you, if you parse it, you could get at least:
For example
arn:aws:iot:us-west-2:27401367543654:policy/MyApplicationDefaultPolicy
^ ^ ^ ^ ^
| | | | |
Service Region AccountID ResourceType ResourceName
Sorry if this is not enough, is the best I can think of right now.
From here you can get a more detailed description: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns
arn:partition:service:region:account-id:resource
arn:partition:service:region:account-id:resourcetype/resource
arn:partition:service:region:account-id:resourcetype:resource
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With