Skip to content
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

Support sharing services through AWS PrivateLink #4005

Open
efekarakus opened this issue Sep 16, 2022 · 5 comments
Open

Support sharing services through AWS PrivateLink #4005

efekarakus opened this issue Sep 16, 2022 · 5 comments
Labels
area/override Issues related to overrides. type/feature Issues that are new feature requests.

Comments

@efekarakus
Copy link
Contributor

Ask

We'd like to expose Backend Services that are build in a separate account and VPC to other AWS accounts. One way of achieving a private connection from a different AWS account is through AWS PrivateLink.

One of the prerequisites for PrivateLink is creating a Network Load Balancer in front of the Backend Service so that it can be referred to from the VPC endpoint service.

The desired architecture should look like:
privatelink

Proposal

In Backend Service Manifest, copilot can expose a way of placing a network load balancer in front of the shared ALB that is created for Backend Services.

name: api
type: Backend Service

http:
  path: '/'

nlb:
  port: 80/tcp
  target: http

This feature would add the nlb field just like for Load Balanced Web Services. However, in addition by specifying target: http we can have an ALB-type target group.

Request For Feedback

Would the feature description above be enough from Copilot to support AWS privatelink? It essentially only sets the prerequisites but doesn't help with creating an endpoint service or interface endpoint.

  • How would you manage the endpoint service?
  • How would you manage the interface endpoint?
  • How about the custom DNS name for the endpoint service?
@efekarakus efekarakus added the type/feature Issues that are new feature requests. label Sep 16, 2022
@Lou1415926 Lou1415926 added the area/override Issues related to overrides. label May 23, 2023
@afgallo
Copy link

afgallo commented May 25, 2023

Hi @efekarakus and @Lou1415926, I've come across this issue when researching AWS PrivateLink connections to SQS and SNS. This is probably not related to this proposal but I was wondering if there is a way to achieve this with AWS Copilot: Can pub/sub architectures leverage PrivateLink so that my services communication never leaves my VPC?

@Lou1415926
Copy link
Contributor

Hey @afgallo ! Are you using worker service for your pub/sub architecture, or did you build your own pub/sub?

Can pub/sub architectures leverage PrivateLink so that my services communication never leaves my VPC?

Could you elaborate on what part of the communication is leaving your VPC? Is the VPC managed by Copilot?

@afgallo
Copy link

afgallo commented May 30, 2023

Hi @Lou1415926 my environments are fully managed by AWS Copilot. We haven't built a pub/sub service yet, I was reviewing the documentation and came across examples with a public http endpoint, so this gave me the impression that SNS and SQS do not have a local endpoint. Is that correct?

@Lou1415926
Copy link
Contributor

ah I see now! Yes the worker service will have to call a public endpoint to pull messages from the queue, and you were right - you'd need a VPC endpoint using AWS PrivateLink to do that. The traffic goes like ECS -> internet gateway -> SQS.

I think you should be able to create an interface endpoint as an environment addon. Once that's done, you will be able to make the API calls via the private endpoint. The traffic would go like ECS --(private link)--> SQS

@afgallo
Copy link

afgallo commented May 31, 2023

That's excellent, thank you @Lou1415926 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/override Issues related to overrides. type/feature Issues that are new feature requests.
Projects
None yet
Development

No branches or pull requests

3 participants