This is my first time to try Elastic Beanstalk I followed the steps to create a sample Python application on Elastic Beanstalk and it works well. Then I downloaded the zip source file and just did a very minor update to change the word 'Congratulations' to some other words. Nothing more I have changed. Then I saved the application.py, zip it and 'upload and deploy'. It then changed to Degraded and the page shows 502 Bad Gateway nginx/1.16.1.
When I fall back to the original version, it works again. Then I did one more test which is to upload the original zip file (exactly the source sample code) as a new version. Unfortunately I got the 502 error again.
So I don't think the problem is related to the code. What could possibly go wrong with the update process?