1

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?

BoooYaKa
  • 2,051
  • 2
  • 16
  • 17

1 Answers1

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