I'm using Java war file, which is deploying in elasticbeanstalk. I want to stop and start EC2 instances for scheduled time. Where I used AWS lambda, under this on process of creating function. I have chose Python2.7, and I have written code for stop EC2 instances. It is working fine, but the issue is after EC2 instances has went to stopped state, it automatically going to terminating and restarting my ec2 instances. How can I stop and start EC2 instances for scheduled time in AWS? Can anyone help me regarding this issue?