Fixing termination of docs ec2 instance