Samsung makes phones that compete with Apple, yet is also one of their biggest suppliers. This happens in business all the time.
AWS knows that if they did anything to harm Netflix's business, it would reflect very poorly on them (and be morally and ethically wrong).
Also, while both offer streaming services, they don't really compete. Many people subscribe to both services.