You can use Amazon Data Lifecycle Manager (Amazon DLM) to automate the creation, retention,
and deletion of snapshots taken to back up your Amazon EBS volumes
S3 lifecycle policies apply to data in S3 buckets only, not to EBS volumes
You could write a script but this is not the best method when you have an AWS feature
available that performs the exact functions you need
CloudFormation is typically used for deploying and updating resource configurations rather
than for performing operational activities