Ana Vinatoru
Ana Vinatoru

Reputation: 191

Listing tags for Amazon Aurora DB cluster snapshots

I have an Amazon Aurora DB cluster with snapshots enabled. I am adding tags to the snapshots and I am having trouble retrieving them, both through the aws cli and the Java API. The tags are successfully added to the snapshots, and are visible in the Amazon RDS Dashboard Snapshots section.

Looking at the documentation here, I have to compose the ARN for the snapshot instance, and use that in the call.

So if the snapshot name (as displayed in the dashboard) is mysnapshot-1234, the ARN should look something like this:

arn:aws:rds:my_region:my_customer_id:snapshot:mysnapshot-1234

The aws cli call looks like this:

aws rds list-tags-for-resource --resource-name arn:aws:rds:my_region:my_customer_id:snapshot:mysnapshot-1234

and it results in:

A client error (InvalidParameterValue) occurred when calling the ListTagsForResource operation: Unable to find a snapshot matching the resource name: mysnapshot-1234

Am I composing the ARN properly? Any other idea how to get this to work? I'm thinking I'm either using the wrong snapshot ID or there is a bug in their API.

Upvotes: 1

Views: 916

Answers (1)

Ana Vinatoru
Ana Vinatoru

Reputation: 191

The documentation was updated in the meantime, and the culprit was the fact that I was using the "snapshot" selector instead of "cluster-snapshot" (Aurora snapshots are created at a cluster level, not at a DB level). So using the right selector I am able to list the tags:

arn:aws:rds:my_region:my_customer_id:cluster-snapshot:mysnapshot-1234

Upvotes: 2

Related Questions