Devilbox returns 504 Gateway Time-out in Amazon ECS

I can run my php application in Docker by using Devilbox but after I deploy it to Amazon ECS it returns error 504.
Any clues?

PHP_SERVER=5.6
HTTPD_SERVER=nginx-stable

In Development environment:
enter image description here

In Staging environment:
enter image description here

Source: StackOverflow