I am trying to automate the creation and destruction of services in AWS.
the destruction is tag-based, in order to use boto3.client('elasticache').list_tags_for_resource()
I need to supply its ARN of the cache-cluster and it's not part of the describing method boto3.client('elasticache').describe_cache_clusters()
like in other resources (DynamoDB or RDS for example)
is there a different way to get the ARN (except of assembling it manually) or an alternate way to iterate over the existing cache-clusters and check the tags?
Asked
Active
Viewed 1,122 times
1

BoooYaKa
- 2,051
- 2
- 16
- 17
1 Answers
1
Based on AWS document, You can generate ARN with a format below.
arn:aws:elasticache:region:account-id:cluster:resource-name
Example:
arn:aws:elasticache:us-west-2:0123456789:cluster:myCluster
or
arn:aws:elasticache:us-west-2:0123456789:snapshot:mySnapshot
Refer links:
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.Overview.html

Tuan Vo
- 1,875
- 10
- 10
-
thanks for the answer, I was aiming to find the ARN without assembling it manually. – BoooYaKa Jan 26 '20 at 14:30
-
AWS sometimes miss useful information in API. In a lot of cases, we have to create ARN via the provided format. – Tuan Vo Jan 26 '20 at 15:44