ECS - Deny communication between 2 services in the same namespace

0

Hello, I'm design an application using ECS and Service Connect and it's not clear for me how to prevent the communication between 2 services that are part of the same namespace.

I have 3 services:

  • Gateway
  • Core
  • Auth

and all of them are part of the same namespace namespace1.

  • Gateway can speak with Auth;
  • Gateway can speak with Core;
  • Core cannot communicate with Auth and viceversa.

What options do I have to prevent Core to reach Auth?

Thanks, Francesco

1개 답변
0
수락된 답변

Since ECS Service Connect is built on top of AWS Cloud Map for service discovery and AWS App Mesh for the networking control, you'll be leveraging these services to achieve your goals. To prevent the Core service from communicating with the Auth service in AWS ECS using the same namespace, you can use AWS App Mesh to control traffic flow. Here's a simplified approach:

  1. Define your services (Gateway, Core, Auth) as virtual services within App Mesh.
  2. Create routes that specifically allow:
  • Gateway to communicate with Core and Auth.
  • Prevent Core from communicating with Auth by not defining any route between them in App Mesh.

This approach focuses on using AWS App Mesh's capabilities to control and route traffic between your services, effectively isolating Core and Auth from each other while still allowing both to communicate with Gateway.

For ref: https://docs.aws.amazon.com/app-mesh/latest/userguide/what-is-app-mesh.html

profile picture
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전
  • Given the potential complexity of App Mesh, could Security Groups provide a simpler way to achieve our security goals for this application? Are there limitations of Security Groups we should consider?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠