'List RDS instances with greater than 7 snapshot retention period

Can someone please help me on listing RDS instances with more than 7 days of snapshot retention period. I am trying something as below, but not working:

aws rds describe-db-instances --query 'DBInstances[*].Attachments[?BackupRetentionPeriod > `7`].DBInstanceIdentifier'



Solution 1:[1]

There is no Attachments property in the output from describe-db-instances.

Instead, try using:

DBInstances[?BackupRetentionPeriod > 7].DBInstanceIdentifier

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jarmod