Your commands did not work on both Cloudshell and EC2 Linux. Here are outputs
#Cloudshell
[cloudshell-user@ip-10-130-70-166 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -v -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"
date: invalid option -- 'v'
Try 'date --help' for more information.
[]
[cloudshell-user@ip-10-130-70-166 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"
date: invalid option -- '3'
Try 'date --help' for more information.
#EC2 Linux
[ec2-user@ip-172-31-26-154 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -v -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"
date: invalid option -- 'v'
Try 'date --help' for more information.
[]
[ec2-user@ip-172-31-26-154 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"
date: invalid option -- '3'
Try 'date --help' for more information.
[]
It does not like -v option. Is there any other option I should try?
Thanks much