Let me introduce myself, I am a system engineer who manage AWS cloud environment and fixing day-to-day operational problem.
502 Bad gateway for cloudfront may be occured because of your origin.
either wrong origin,More