Added opt-in support for EC2.
Merge branch 'ec2-opt-in' into develop
Fixes #2074.