Errore 504 Gateway dopo il lancio di una nuova istanza AWS

here is a post you can check that might help you