-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Design] enable internal ALBs for Backend Services #3538
Comments
Q for those interested in this feature:
|
We need internal ALB, but we will have to use a VPC with "public" subnets routed on our on-prem network and "private" subnets for the application only. So the ALB should be deployed on the "public" subnets to be reachable from the on-prem network, whereas ECS services will be deployed on private subnets. So unfortunately, I think this design will be not compatible with our needs. |
Hi @rverpillot ! I have a few questions below if you don't mind to help us build the right thing:
Thank you! |
Bonjour @efekarakus ! It’s fine to help you to help us ! All these subnets are private (no IGW). But importing them in copilot as public and private subnets permits to keep the network placement policy. In this case “public” means “enterprise scope” and “private” means “application scope”. Maybe I’m wrong but Copilot doesn’t check an existing IGW by itself for public subnets, but AWS API does it just before to create an internet-facing ALB (obviously it’s not the case for an internal ALB). |
Hello, @rverpillot! Just to clarify, please:
Thank you so much. I apologize for the back and forth; we just want to make sure we are building what you need. |
Hello @huanjani . We have 2 private subnets for the application deployment: 1 for the services only (and not directly accessible from outside), and 1 where the ALB must be deployed to be accessible from our on-prem network (because it will get a routable IP address through AWS Transit Gateway and AWS Direct Connect). So by importing our "enterprise-scope" subnets as "public" subnets and our "application-scope" subnets as "private" subnets in the Copilot environment, the internal ALB could be deployed in the right place, and we can still using the The Inbound rules for 80 and 443 ports and source from 0.0.0.0/0 are OK for me. Maybe I could post a diagram to clarify this ? |
A diagram would be great! Thank you! |
Maybe it's not clear because we are not talking about the same things. I understand this design is to add an internal ALB for backend services only. But what about frontend services ? Features we need to deploy copilot applications on private VPC (multiple private subnets and no IGW):
|
Thank you so much for the additional information! Our plan is what you mentioned above, to "add a new setting to choose the placement." This is because we'd like to keep Load Balanced Web Service to be reserved for internet-facing services and Backend Service to model any internal services.
In this way, you can place the internal ALB in the enterprise scope, and your services in the application scope, but the services will have access to the internal load balancer. Please let us know if you have further questions or input! |
Just 1 question: do you confirm the only difference between "Backend Service" with |
Yes!
|
@huanjani we are OK with this design. Maybe in the future, these 2 kinds of service could be merged, and only network placement and maybe an whatever, thank for your listening. |
Bonjour @huanjani The feature |
Bonjour! |
It works. Thank you @huanjani ! But I found an another issue: the security group of the internal ALB is not correct: inbound rules for port 80 and 443 are missing. |
Yes, we acknowledge this request, and the feedback that we got supported that request as well, but we decided to build the permissions as least-privileged, knowing that users may optionally add permissions using Your
Also, in the next few weeks, we will introduce environment manifests 🎉 , which will allow you to configure the security group of the ALB, giving you an easier way to set permissions! |
Hi! Regarding the security group permissions, would it be possible to transparently open 80 and 443 only if an I understand the need to follow the least-privileged principle but if you declare an What do you think about it, @huanjani ? |
Hello, @adrienlauer! We totally understand the desire to streamline the opening up of permissions. We will now add a flag to be used with Hope that works for you! |
Hello @huanjani I understand you don't want to add these inbound rules by default to the security group when the internal ALB is used between Copilot services only because it would be a security issue. But could be possible to detect automatically the use case where the internal ALB is used like a frontend ALB and allow traffic from ports 80 and 443 ? |
Bonsoir @rverpillot ! We have merged fbd454d which adds the flag This is a short-term workaround. In July, we're planning to deliver #3522 which will allow you to modify environment resources such as load balancer security groups, add or remove certificates, ECS cluster settings. The env manifest should make using these flags obsolete |
Bonjour @efekarakus ! Yes, it’s OK for us. I already built copilot with this commit and we will test this feature the next week. Thanks. |
This feature is now released in v1.19.0: https://github.com/aws/copilot-cli/releases/tag/v1.19.0! 🎉 Thank you all so much for your collaboration! |
Add support for a shared internal load balancer with Backend Services
Allow users to add the http field, currently limited to internet-facing Load Balanced Web Services, to Backend Services' manifests. The deployment of a Backend Service with
http
specified will trigger the creation of an internal load balancer in the environment to which the service is deployed. The internal load balancer may be shared by all Backend Services in the environment.For users who want to have an https endpoint, they can leverage the new import existing certificates feature. If certs are imported into an environment with a VPC with only private subnets, they will be automatically applied to the internal load balancer.
Users can then bring their own hosted zones so that once the load balancer is created, Copilot will insert the alias record into the hosted zone, mapping the alias name to the LB's DNS name.
When multiple services and aliases are in play, users will need to 1. bring a hosted zone and provide a unique alias for each service they create or 2. not bring a hosted zone and add records post-release, independently of Copilot.
Related: #2961, #3344.
The text was updated successfully, but these errors were encountered: