amazon-web-servicesfiltertagscommand-line-interfacerds

Unable to filter on AWS RDS stack-name


Why doesn't this just work? Pulling the tags listed with my rds instance:

aws rds list-tags-for-resource --resource-name arn:aws:rds:eu-central-1:12345678901:db:pa1jyg4oc56mipf

{
    "TagList": [
        {
            "Value": "DatabaseRdsInstance",
            "Key": "aws:cloudformation:logical-id"
        },
        {
            "Value": "production-test-123",
            "Key": "aws:cloudformation:stack-name"
        },
        {
            "Value": "arn:aws:cloudformation:eu-central-1:12345678901:stack/production-test-123/1234abc-56f9-11e5-b10e-50d501fbb66e",
            "Key": "aws:cloudformation:stack-id"
        }
    ]
}

Filtering on one of those tags fails:

aws rds describe-db-instances --filters Name="tag:aws:cloudformation:stack-name",Values=production-test-123
A client error (InvalidParameterValue) occurred when calling the DescribeDBInstances operation: Unrecognized filter name: tag:aws:cloudformation:stack-name

Nor does it work when I leave the tag part from the Name:

aws rds describe-db-instances --filters Name="aws:cloudformation:stack-name",Values="production-test-123"

A client error (InvalidParameterValue) occurred when calling the DescribeDBInstances operation: Unrecognized filter name: aws:cloudformation:stack-name

What am I missing here?


Solution

  • According to the documentation the --filters option is currently unsupported unfortunately.

    You will have to perform the filtering on the tags on the client side instead.