Deploying with Elasticbeanstalk Metabase zip


I'm using AWS EB and the zip provided for metabase to deploy. (

However I was surprised that none of my query could run more than 60 second despite the nginx configuration step in the zip.

When I looked closely at the start up logs, I realized that the configuration of nginx fails :

2021-05-12 06:00:15,838 P3250 [INFO] ============================================================
2021-05-12 06:00:15,839 P3250 [INFO] Command 01_server_https
2021-05-12 06:00:15,845 P3250 [INFO] -----------------------Command Output-----------------------
2021-05-12 06:00:15,846 P3250 [INFO] .ebextensions/metabase_config/ line 36: cd: /etc/nginx/sites-available/: No such file or directory
2021-05-12 06:00:15,846 P3250 [INFO] ------------------------------------------------------------
2021-05-12 06:00:15,846 P3250 [INFO] Completed successfully.
That's because the AWS Linux image does not install nginx with sites-available folder but with conf.d.

So I updated the init command to have the nginx configuration files installed in /etc/nginx/conf.d/ instead. Now the command run without errors but he validation of the nginx conf files fails :

2021-05-12 14:41:33,152 P4050 [INFO] Test for Command 05_try_nginx
2021-05-12 14:41:33,257 P4050 [INFO] -----------------------Command Output-----------------------
2021-05-12 14:41:33,257 P4050 [INFO] nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-proxy.conf:11
2021-05-12 14:41:33,257 P4050 [INFO] nginx: [emerg] host not found in upstream "docker" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-proxy.conf:23
2021-05-12 14:41:33,257 P4050 [INFO] nginx: configuration file /etc/nginx/nginx.conf test failed
2021-05-12 14:41:33,257 P4050 [INFO] ------------------------------------------------------------
2021-05-12 14:41:33,257 P4050 [ERROR] Exited with error code 1

... and my queries can't run for longer than 60 still.

Could you advise on how to modify the file to have a valid nginx conf ?

Thanks a lot for your help

Edit : here is the documentation for writing the configuration files for deploying to Elasticbean

Hi, I wrote this guide and nginx is causing more issues than benefits. We will probably remove custom nginx config from the eb deployment in the near future. Thanks for the heads up

I found this topic which is probably related : Failed to deploy new elastic beanstalk instance. Nginx Conf Failure

wasn't the problem there that no files were written in conf.d/ at init ?

Thanks for your answer anyway. I'll give a shot at deploying following the instructions from the AWS docs.