Search code examples
amazon-web-servicesnginxamazon-ec2httpsload-balancing

Do I need to configure certs on nginx itself if nginx is inside ec2 instance on loadbalancer which can only be accessed using https?


I have the cert applied on the load balancer, and https works fine, but i am wondering if I need to add the certs to nginx itself, which seems overkill but i am not sure.


Solution

  • enter image description here No, one of the benefit of using a Load Balancer is you can hide your EC2 from public internet, making it less open and more secured.

    Therefore, it is normal practice to use HTTP between your EC2 and load balancers, since they are in the same AWS Region (a safe and trusted internal environment).

    By doing this you will also increase performance, because the https network overhead is only executed once in the load balancer, not twice. Your EC2 will focus the CPU resources on running the application logic instead.

    Load Balancer is also Highly Available and can be configured to work with CloudFront and WAF for security and anti-DDoS controls.