add option to set the ec2 enpoint