How to restrict access to Elastic Beanstalk that it can process requests only from API Gateway?
From API Gateway's point of view it is quite simple:
- Generate simple Client Certificate (via API Gateway dashboard),
- Backend validates Certificate on every request.
(A) But how should I validate this Client-Side Cert. on my Elastic Beanstalk (EB) in multidocker configuration with NGINX?
I've read that Elastic Load Balancer (ELB) (the component of EB) cannot validate it. I have to validate it using NGINX running as Docker container on EC2 behind ELB.
(B) What should I set up on Elastic Load Balancers of EB (ports configuration: HTTP(S) / TCP)? Have I buy a verified SSL certificate that my Elastic Beanstalk could to use 443 port?
(C) What should I set up on my EC2 instance? (Besides NGINX - I believe that I know how to setup nginx.conf)
(D) Are there some downsides of using TCP instead of HTTP in ELB?
I've read some articles and other SO posts about this problem, but currently I feel confused about this topic. Any clarification will be very helpful!