copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

[Feature Request]: 3 Tier architecture - How to configure so that Backend Service security group's inbound rules allow Load Balanced Web Service connection

Open rickychew77 opened this issue 1 year ago • 4 comments

Describe your idea/feature/enhancement

For some project that is simple front end backend architecture, I would like to have the Backend Service's Security Group inbound rule that was created by default from Copilot to allow Load Balanced Web Service's connection. Understand that there is there is a way to import existing security_group here however this does not achieve what I described above.

Proposal

Is there a way to allow multiple copilot services to "discover" each other given the IAM permission was sorted out, so that not only security group but any other potential configuration can be seamless.

Additional Details

Maybe in either one of the services there is a field in the manifest.yml to point to each other?

rickychew77 avatar Apr 11 '24 02:04 rickychew77

Hello @rickychew77. I don't get why we need to do this through security group 🤔 Right now the backend service only allows access from all services deployed within the same environment. Do you mean you want the backend service to be only accessible from a specific LBWS, whereas all the other services deployed to the same environment can't access?

iamhopaul123 avatar Apr 12 '24 19:04 iamhopaul123

yes, i am not sure if this is the best practice to do, but basically is to allowing frontend ECS connectiion to backend ECS, both are within same VPC.

rickychew77 avatar Apr 13 '24 01:04 rickychew77

Yeah in that scenario using service connect or service discovery that comes with the Copilot deployment would be recommended. You can check the endpoints by doing copilot svc show!

iamhopaul123 avatar Apr 15 '24 16:04 iamhopaul123

Yes, understand that using service connect (Cloud Map) that comes with Copilot deployment.

However, we still need to configure the backend ECS security group to allow access from frontend ECS (both created via copilot.) The default inbound rule only have this rule Ingress from other containers in the same security group.

Currently it's not a blocker, just that we have perform clickops in aws console.

rickychew77 avatar Apr 18 '24 02:04 rickychew77