Make ec2 endpoint configurable.

To support custom implementations of EC2 API.