I had the same problem an solved it. Have a look at the step-by-step instructions:
- Go to console.aws.amazon.com
- Go To Services -> VPC
- Open Your VPCs
- select your VPC connected to your EC2 and
- select Actions => Edit DNS Hostnames
—> Change DNS hostnames: to YES