Fix ec2 metadata issue