How do I deploy Dash to Elastic Beanstalk with Basic Authentication


I have followed the documentation on setting up authentication for Dash and works correctly locally. However when I tried to deploy the Dash app to AWS by Elastic Beanstalk, it won’t accept the username and password pair. I have searched on line and it seems to be related to the fact that AWS removes the Authentication Header from the HTTP request.

People suggests to include a file named python.config

command: ‘echo “WSGIPassAuthorization On” >> …/wsgi.conf’

to .elasticbeanstalk folder.

I have tried that without much luck.

What should I do ?


I have this exact same problem, have you found a solution ?


I struggled with this for hours. It looks like AWS changed the filename requirements over time without any documentation that I could find.

It was finally fixed when I changed the filename to wsgi_custom.config, and saved it in .ebextensions, not .elasticbeanstalk, although I have it in both places for good measure.

It seems like it has to be .config, not .conf.

Here’s the content of my .ebextensions/wsgi_custom.config" file:

    mode: "000644"
    owner: root
    group: root
    content: |
    WSGIPassAuthorization On


Worked like a charm! Thank you very much!