Issue
I want my existing EC2-Instances, to automatically get backupped, terminated and later on get started with the backupped status again. The backup and termination should get done in the evening and get started again in the morning.
I already figured out that the EBS should get a backup on a S3 and for the Instance itself i could use an AMI (And maybe the EC2-Image-Builder?). It all should get triggered by Cloudwatch Events in combination with AWS Lambda.
Do you know if this idea is possible to perform, or if there is a better one?
Thanks for your attention
Solution
I use Terraform to automate my deployment of the EC2-Instance with my wanted Applications.This is specified in a Script that runs automatically after launch, which you can also deploy in Terraform. So Terraform deletes and starts my Instance and for backup and recovery I also use scripts and crontabs. So the recovery of my persistent data is also specified right in the script that also installs the applications on my EC2-Instance and uses S3 Buckets through the aws cli. And the backup has its own script which is pulled through the Script in Terraform which also sets the crontab for it. =)
Answered By - Thanatos-Delta Answer Checked By - Pedro (WPSolving Volunteer)