Vimanav has already nailed it , but just to add a lil more to it , the russian aviation industry is in doldrums. Technically they are exceptional products but with the lack of cash in their own country they are willing to sell , not just the product but the technology rather cheap. It is not just the aircraft which India wants it is what goes into building these aircrafts. The prime example is the Su 30 MKI. Based on the Su 35 , it has been completely customized by India. The "I" in the MKI does stand for India. The avionics are from israel and India , weapons system again developed by India and Israel while the fighter is built by Russia. This deal also came with the option that the Berkut will be developed jointly between Sukhoi and HAL .
As far as the US goes , years and years of mistrust and their actions have put India on a backfoot when it comes to their products , you never know when you are going to stop getting spares for your frontline fighters.