The issue here was with security groups when i added additional rule to allow traffic from anywhere with in the vpc cidr range. It started working