India has told foreign e-commerce firms such as Amazon and Walmart's Flipkart that they must ensure compliance with new foreign investment rules aimed at deterring them from providing steep online discounts, three sources familiar with the discussions told Reuters.