AWS Lambda can be a probable solution to this issue. It will automate the backup of your AMI and clearance. You can also schedule the lambda function to run periodically and so you will not need your EC2 instance running constantly.
Hope this helps!
To learn more about AWS Lambda, see: