504 Gateway error after launching new AWS instance

here is a post you can check that might help you