To set up auto termination for your instance, follow the below-mentioned steps:
1. Start the instances with the "instance -initiated-shutdown-behaviour set to "terminate"
2. SSH into your instance and Login as the root user
3. Run the following command:
echo "sudo halt" | at now + 55 minutes
Now your instance will self terminate after 55 minutes