Added Custom namespace support and use of ec2 instance name