Home > other >  How to use SSL/TLS on ECS Fargate
How to use SSL/TLS on ECS Fargate

Time:02-19

I am trying to use SSL/TLS for Python Flask/Waitress server running the ECS Fargate. I haven't found a solution for our use case.

Here are the designs for the ECS Fargate:

  • Container will only interacts with backend AWS Lambda
  • Public IP disabled, only private ip is enabled.
  • No use of load balancer. The Python server is stateful and spinning a new container when requested is more cost effective.

How should I make a HTTPS request from Lambda to the ECS Fargate?

CodePudding user response:

Why do even need to make an HTTPS request from the lambda?

Answer to your question

Enable the security group port 443 on your ecs fargate instance and you should be able to make requests even without ssl certs as browsers only block them,

2nd thing is if for any reason you need a SSL cert on localhost you can use this library https://github.com/FiloSottile/mkcert

CodePudding user response:

Solved the issue:

  • Create a self-signed cert using OpenSSL in Flask server
  • Trust self-signed certs in Lambda
  • Related