3

I seem to be stuck with my architecture for ECS Microservices. Current State :

enter image description here

  1. ECS cluster with 2 EC2 instances in private subnets exposing a dockerized node express endpoint on port 3000 (1 service, 2 running tasks)
  2. NAT gateway route out from VPC's default route table
  3. internal NLB in front of those 2 EC2 instances.
  4. VPC Link created in API Gateway for targeting the NLB.
  5. API gateway integration with the VPC link (what do I enter as the endpoint URI? is it the DNS of the NLB? or custom domain name in step 6)
  6. Created custom domain name for the API gateway

when I try to send a request to customdomainname:3000/task. I expected the task to be run However I do not get any response(There was an error connecting to customdomainname:3000/task).

Everything works perfectly fine if its an internet facing Application load balancer and instances in public subnet, but I need to use the VPC link approach to secure my application.

I understand my question might be vague, but I would appreciate any input and insights from anyone who has worked on this before

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
melroyd16
  • 85
  • 2
  • 9
  • Did you solve it? – Niklas Ekman Dec 19 '18 at 16:17
  • AWS CloudFront as a single door to access everything might solve your problem. You can use CloudFront to request/response from internal network without exposing your web server to world. – Nono Aug 02 '21 at 18:55

0 Answers0