3

How to setup a Amazon(AWS) Load Balancer to work with Pyramid

The below example shows you how to setup your Amazon Load Balancer to forward HTTPS traffic to the internal Pyramid web server.

As can be seen below two listeners have been setup. One on HTTP and the other on HTTPS. The HTTP listener is set to forward to the HTTPS listener. Meaning if a user tries to access the site using HTTP they will get redirected to HTTPS.

 

Then a target to the Pyramid Web server needs to be set as shown below:

Note that the port used is TCP Port 8181 as this is the default port that the Pyramid web server runs on. 

 

4 replies

null
    • Bogdan_Popescu
    • 4 yrs ago
    • Reported - view

    please correct this post as this is an Application Load Balancer. And yes it works well. There are additional settings a user should do in the application settings to enable https as well, as bindings ;)

    • Daniel
    • 4 yrs ago
    • Reported - view

    Bogdan Popescu  Thanks for your input, we have updated the article. Please feel free to post the additional settings that you did in order to enable HTTS. Thank you.

    • Robert_Clark
    • 3 yrs ago
    • Reported - view

    This solution no longer works after applying patch version 2020.02.084.  The port forwarding now gives the following error:  Access to XMLHttpRequest at 'http://<Pyramid_Server>.com/' (redirected from 'https://<Pyramid_Server>.com/refresh') from origin 'https://<Pyramid_Server>.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

      • Liran_Jorno
      • 3 yrs ago
      • Reported - view

      Robert Clark We have pushed a fix in our next release which solves the error message you have received.