AWS PrivateLink Step by Step - Publish Your Own Service with a VPC Endpoint Service and Network Load Balancer, Allow Consumers, Accept Connections, Private DNS Name, Cross-Account and Cross-Region, Pricing and Troubleshooting (AWS Part-20)
In Part-19 we were the consumer - we created interface endpoints to reach AWS services privately. This Part-20 flips the table: we are the provider. We have an application in our VPC and want other VPCs - other teams, other accounts, customers - to reach it privately, without VPC peering, without exposing it to the internet, and without caring whether their CIDR overlaps ours. That is AWS PrivateLink with a VPC endpoint service: our service sits behind a Network Load Balancer (Part-18), we register the NLB as an endpoint service, and each consumer gets an interface endpoint in their own VPC that leads straight to it.
It is exactly how AWS exposes its own services to your VPC, how SaaS vendors on the Marketplace deliver private connectivity, and how large organisations share internal APIs across hundreds of accounts. Checked against the current PrivateLink documentation, including cross-region endpoint services, which did not exist when I recorded the video.
TL;DR
- PrivateLink exposes one service, one way, to other VPCs and accounts without peering, routes or CIDR coordination: the provider puts an internal Network Load Balancer in front of the application and creates an endpoint service; each consumer creates an interface endpoint and gets a private IP in its own subnet.
- In my recording: provider VPC
11.0.0.0/16with the NLB and endpoint servicevpce-svc-07ea47f279535d099(acceptance required, 2 Availability Zones), consumer VPC21.0.0.0/16with endpointvpce-0e1d7018898990bdd; the connection sat inPending acceptanceuntil I accepted it, andcurlfrom the consumer's private instance (21.0.3.165) to the endpoint DNS name returned the provider page "This is demo for aws private links : This is service provider ec2". - Overlap does not matter. The Terraform below gives both VPCs
10.0.0.0/16on purpose and still plans cleanly, because the consumer only ever talks to an IP in its own subnet. - Who pays: the consumer, $0.01 per endpoint network interface per hour in N. Virginia and $0.012 in Frankfurt (so per AZ), plus $0.01 per GB processed; the provider pays for the NLB. Two AZs and 100 GB a month is about $15.60 in N. Virginia.
- Limits: 50 interface endpoints per VPC by default, 10 Gbps per endpoint per Availability Zone scaling to 100 Gbps, one endpoint service per NLB.
- Not your exact case? If you need two whole VPCs to talk both ways, that is VPC peering, Part-12; if you want private access to AWS's own services such as S3 and ECR, that is VPC endpoints, Part-19.
Table of Content
- Why PrivateLink instead of peering or Transit Gateway
- How an endpoint service works - provider, NLB, service name, consumer endpoint
- Step 1 - The provider VPC and the application behind an internal NLB
- Step 2 - Create the endpoint service
- Step 3 - Allow the consumer principals
- Step 4 - The consumer creates an interface endpoint to your service
- Step 5 - Accept the connection and test
- Step 6 - Add a private DNS name (domain verification)
- Getting the real client IP - proxy protocol v2
- Cross-account, cross-region, and selling on the Marketplace
- Who pays what
- The AWS CLI equivalents
- Common PrivateLink errors and how to fix them
- What broke when I ran this
- Conclusion
1. Why PrivateLink instead of peering or Transit Gateway
| VPC peering (Part-12) | Transit Gateway (Part-13) | PrivateLink | |
|---|---|---|---|
| What connects | two whole networks, both directions | many whole networks, routed | one service, consumer → provider only |
| Overlapping CIDRs | impossible | impossible | irrelevant - the consumer only sees an IP in its own subnet |
| Routes to maintain | in every VPC | VPC + TGW tables | none - it is DNS and an ENI |
| Exposure of the provider network | all of it (minus security groups) | all of it | only the NLB listener |
| Consumers | tens | thousands of VPCs | thousands of accounts, including ones you do not know (SaaS) |
| Cost model | free + data transfer | attachment-hours + GB | consumer pays endpoint-hours + GB |
PrivateLink is the answer when the requirement is "expose this service to those consumers, privately, and nothing else". It is not a replacement for peering when two teams need full network access between their VPCs.
The "overlapping CIDRs are irrelevant" row deserves a demonstration. My VPC Subnet Planner opens here with a provider VPC of 10.0.0.0/16 and an existing network of 10.0.0.0/16 named "consumer vpc": it flags the overlap and drops the design score, which is exactly right for peering or Transit Gateway and exactly irrelevant for PrivateLink. The same two VPCs are in the Terraform in section 12, and the plan does not care.

2. How an endpoint service works - provider, NLB, service name, consumer endpoint
From the PrivateLink concepts -
- The provider runs the application and puts a Network Load Balancer (or a Gateway Load Balancer for appliances) in front of it. Endpoint services require one of those two; an ALB can sit behind the NLB as its target.
- The provider creates an endpoint service from the NLB. AWS assigns a service name -
com.amazonaws.vpce.eu-central-1.vpce-svc-0123456789abcdef0- and the provider decides which principals may connect and whether connections need acceptance. - A consumer creates an interface endpoint of type Endpoint services with that service name, in the subnets of their choice. AWS creates endpoint network interfaces in the consumer VPC and, behind the scenes, a private connection to the provider's NLB in the same AZs.
- The consumer reaches the service through the endpoint's DNS names - the AWS-generated
vpce-...vpce-svc-....eu-central-1.vpce.amazonaws.com, or the provider's own private DNS name (api.jhooq.com) once verified. - Traffic flows one way - consumer to provider - over the AWS network; the provider's NLB sees the request arriving from the NLB's own node addresses (unless proxy protocol is on).
The Availability Zone matters: the endpoint service is available in the AZs where the NLB has subnets, and consumers can only create endpoint ENIs in AZs they share with the provider - compared by AZ ID (euc1-az2), because eu-central-1a can map to different physical zones in different accounts.
3. Step 1 - The provider VPC and the application behind an internal NLB
Provider side, in jhooq-vpc (10.0.0.0/16, Part-5) -
- Two instances running the nginx page from the Auto Scaling launch template, in the private subnets
jhooq-private-1aandjhooq-private-1b, security groupjhooq-app-sg. - A target group
jhooq-pl-tg, type Instances, TCP 80, health check HTTP/health, both instances registered. - An internal Network Load Balancer
jhooq-pl-nlb- Scheme Internal, mappings in both private subnets, security groupjhooq-nlb-sg(allow TCP 80 from10.0.0.0/8- or, for PrivateLink traffic specifically, see the note below), listener TCP 80 →jhooq-pl-tg. Full build in Part-18. jhooq-app-sgallows TCP 80 fromjhooq-nlb-sg.
Two PrivateLink-specific notes from the prerequisites: the NLB should have a subnet in every AZ where consumers will connect (at least two), and if the NLB has a security group, its inbound rules must allow the consumer client IPs - which you do not know for arbitrary consumers - so either allow the listener port from 0.0.0.0/0 on the NLB (it is internal; only PrivateLink and your VPC can reach it anyway) or turn off Enforce inbound rules on PrivateLink traffic on the NLB's Security tab. From a bastion in the provider VPC, curl http://<nlb-dns-name>/ must work before you continue. In the recording the provider is service-provider (11.0.0.0/16, public subnet 11.0.1.0/24, private subnet 11.0.3.0/24) with one Amazon Linux instance serving a static page and the internal NLB service-provider-nlb in both Frankfurt zones. The NLB's Integrations tab is where the console nudges you towards the next step:

4. Step 2 - Create the endpoint service
VPC → Endpoint services → Create endpoint service (docs) -
- Name tag
jhooq-api-service. - Load balancer type - Network. Available load balancers - tick
jhooq-pl-nlb. Details of selected load balancers → Included Availability Zones shows where the service will be available. (One NLB belongs to at most one endpoint service; a service can have several NLBs for capacity.) - Service Regions - optional; add other regions to let consumers there connect (section 10).
- Require acceptance for endpoint - tick Acceptance required - every consumer connection waits for you to approve it. Leave it off only for fully automated internal setups.
- Enable private DNS name - leave off for now; we add it in section 8 after verifying the domain.
- Supported IP address types - IPv4.
- Create.

The service appears with its Service name, state Available. In the recording it was com.amazonaws.vpce.eu-central-1.vpce-svc-07ea47f279535d099, available in 2 Availability Zones, with the AWS-generated DNS name vpce-svc-07ea47f279535d099.eu-central-1.vpce.amazonaws.com:

Copy the service name - it is what consumers need, together with the list of AZs.
5. Step 3 - Allow the consumer principals
By default nobody can connect. Select the service → Allow principals tab → Allow principals → enter ARNs (manage permissions) -
- a whole account:
arn:aws:iam::222222222222:root - one role or user:
arn:aws:iam::222222222222:role/NetworkAdmin - an organization or OU:
arn:aws:organizations::111111111111:organization/o-abc123/arn:aws:organizations::111111111111:ou/o-abc123/ou-xyz - everyone (public SaaS):
*- combined with acceptance required, so you still approve each one
The principal is checked when the consumer creates the endpoint. Removing a principal later does not disconnect existing endpoints - reject or delete the connection for that.
6. Step 4 - The consumer creates an interface endpoint to your service
Now switch hats (and, in the real world, accounts). In the consumer VPC - jhooq-consumer-vpc, which can deliberately use the same 10.0.0.0/16 to prove overlap does not matter - with an instance in a private subnet: VPC → Endpoints → Create endpoint -
- Name tag
to-jhooq-api. Type - Other endpoint services (the console's wording in 2024; earlier it read "Endpoint services that use NLBs and GWLBs").

com.amazonaws.vpce.eu-central-1.vpce-svc-0123456789abcdef0 → Verify service. A green Service name verified means the principal is allowed; Service name could not be verified means it is not (or a typo).
3. VPC - jhooq-consumer-vpc. Subnets - one per AZ that the service lists (the console only offers AZs you have in common).
4. IP address type IPv4. Security group - consumer-vpce-sg allowing TCP 80 from the consumer VPC CIDR (the endpoint ENIs receive the traffic).
5. Create endpoint. State: Pending acceptance.
The consumer's Details tab shows the DNS names of the endpoint - a regional one and one per AZ -
1vpce-0def4567890abcdef-abcd1234.vpce-svc-0123456789abcdef0.eu-central-1.vpce.amazonaws.com
2vpce-0def4567890abcdef-abcd1234-eu-central-1a.vpce-svc-0123456789abcdef0.eu-central-1.vpce.amazonaws.com
7. Step 5 - Accept the connection and test
Provider side: Endpoint services → jhooq-api-service → Endpoint connections tab shows the request from account 222222222222 with state Pending acceptance → select → Actions → Accept endpoint connection request → confirm. (Rejecting or later deleting the connection from here cuts the consumer off instantly.) The consumer's endpoint goes Pending → Available in a minute.
Consumer side, from the private instance. This is the moment in my recording, from 21.0.3.165 in the consumer VPC to the endpoint's regional DNS name:
1[ec2-user@ip-21-0-3-165 ~]$ curl vpce-0e1d7018898990bdd-5ujko9yj.vpce-svc-07ea47f279535d099.eu-central-1.vpce.amazonaws.com
2<!DOCTYPE html>
3<html>
4 <head>
5 <!-- head definitions go here -->
6 <h1> This is demo for aws private links : This is service provider ec2 </h1>
7 </head>
8 <body>
9 <!-- the content goes here -->
10 </body>
11</html>

The first attempt, a few seconds earlier, had hung and I interrupted it with Ctrl-C; the provider instance's security group only allowed SSH, and the fix was an HTTP rule, which is item 3 of section 13 and section 14. For a database the same check is a port probe and a DNS lookup:
1nc -zv <endpoint-dns-name> 5432
2dig +short <endpoint-dns-name> # answers with IPs in the CONSUMER subnets, e.g. 21.0.3.x
The consumer talks to a private IP in its own subnet; the provider's application answers; neither VPC has a route to the other. On the provider side, the nginx access log shows the request coming from the NLB node's private IP, not from the consumer - that is section 9.
8. Step 6 - Add a private DNS name (domain verification)
Consumers do not want to hard-code vpce-0def...vpce.amazonaws.com. A private DNS name lets them use api.jhooq.com, and if your service also has a public endpoint under the same name, their code works unchanged inside and outside the VPC (the docs call this out as the main benefit). You must prove you own the domain first -
- Provider: Endpoint services →
jhooq-api-service→ Actions → Modify private DNS name → Associate a private DNS name with the service →api.jhooq.com→ Save. The Details tab now shows Domain verification name (_6e86v84tqgqubxbwii1m) and Domain verification value (vpce:l6p0ERxlTt45jevFwOCp), statuspendingVerification. - In the public hosted zone for
jhooq.com(Part-15) create a TXT record - Record name_6e86v84tqgqubxbwii1m.jhooq.com, Value"vpce:l6p0ERxlTt45jevFwOCp", TTL 1800. (Verifyingjhooq.comcovers every subdomain, so one TXT servesapi.jhooq.comandmy.service.jhooq.com.) - Check it published -
nslookup -type=TXT _6e86v84tqgqubxbwii1m.jhooq.com ns-123.awsdns-45.com- then Actions → Verify domain ownership for private DNS name. Status becomesverified(minutes; DNS propagation can take longer). - Consumer: select the endpoint → Actions → Modify private DNS name → Enable for this endpoint. Requirements on the consumer VPC: DNS hostnames and DNS resolution enabled. AWS creates a hidden private hosted zone in the consumer VPC with
api.jhooq.com CNAME → the endpoint's regional name.
1# on the consumer instance
2dig +short api.jhooq.com
3# 10.0.11.200
4curl -s http://api.jhooq.com/
Outside the consumer VPC api.jhooq.com still resolves to whatever public record you keep - split-horizon by PrivateLink. One private DNS name per endpoint service; not supported for Gateway Load Balancer endpoints.
9. Getting the real client IP - proxy protocol v2
With PrivateLink the provider's targets see the NLB node IPs as the source, so logs, rate limits and allow-lists lose the client. The fix is proxy protocol v2 on the NLB target group - Target groups → jhooq-pl-tg → Attributes → Edit → Proxy protocol v2 → on. The NLB then prepends a binary header to every TCP connection carrying the consumer's private IP and, as a PrivateLink extension (TLV type 0xEA), the endpoint ID (vpce-0def...) - so you know which consumer is calling, not just which IP (several consumers may have the same 10.0.11.x). Your application or proxy must understand the header - nginx (proxy_protocol on the listen directive and $proxy_protocol_addr), HAProxy, Envoy and most load balancers do; a raw application will see garbage at the start of the stream, so turn it on only when the targets are ready.
10. Cross-account, cross-region, and selling on the Marketplace
- Cross-account is the normal case - we just did it. Allowed principals plus acceptance give you the control; AWS RAM is not involved (that is for resource configurations / resource endpoints, the newer PrivateLink flavour for single resources without a load balancer).
- Cross-region - since late 2024 an endpoint service can list Service Regions; a consumer in
us-east-1creates an endpoint with Enable Cross Region endpoint and the consumer VPC never needs anything ineu-central-1. The provider pays a per-remote-region hourly fee, the consumer pays endpoint hours, data processing and inter-region data transfer; no inter-region VPC peering or TGW needed. - Marketplace / SaaS - PrivateLink is how vendors like Snowflake, Datadog and MongoDB Atlas offer "private connectivity". Technically identical to this post with
*as the allowed principal and acceptance on, plus the private DNS name so customers useyour-tenant.vendor.com. The SaaS access guide describes the consumer side.
11. Who pays what
From the PrivateLink pricing -
- Consumer - $0.01 per endpoint ENI per hour in N. Virginia and $0.012 in Frankfurt (so per AZ) plus $0.01 per GB processed for the first 1 PB a month, $0.006 up to 5 PB and $0.004 beyond, from the AWS pricing feed on 2026-10-17. Two AZs, 100 GB a month ≈ $15.60 in N. Virginia.
- Provider - the NLB ($0.0225 per hour plus NLCUs, Part-18) and the application; the endpoint service itself has no charge, except a per-remote-region hourly fee if you enable cross-region access.
- Nobody pays data transfer between the VPCs for same-region PrivateLink beyond the processing fee; cross-AZ charges apply if the consumer uses an endpoint ENI in one AZ to reach a provider target in another (keep AZs aligned, or enable NLB cross-zone and accept the charge).
12. The AWS CLI equivalents
1# provider: endpoint service from the NLB, acceptance required
2SVC=$(aws ec2 create-vpc-endpoint-service-configuration \
3 --network-load-balancer-arns "$NLB_ARN" --acceptance-required \
4 --tag-specifications 'ResourceType=vpc-endpoint-service,Tags=[{Key=Name,Value=jhooq-api-service}]' \
5 --query ServiceConfiguration.ServiceId --output text)
6aws ec2 describe-vpc-endpoint-service-configurations --service-ids "$SVC" --query 'ServiceConfigurations[0].ServiceName'
7
8# provider: allow a consumer account
9aws ec2 modify-vpc-endpoint-service-permissions --service-id "$SVC" --add-allowed-principals arn:aws:iam::222222222222:root
10
11# consumer (account 222222222222): interface endpoint to the service
12aws ec2 create-vpc-endpoint --vpc-id vpc-0consumer --vpc-endpoint-type Interface \
13 --service-name com.amazonaws.vpce.eu-central-1.vpce-svc-0123456789abcdef0 \
14 --subnet-ids subnet-c1a subnet-c1b --security-group-ids sg-0cvpce
15
16# provider: accept
17aws ec2 describe-vpc-endpoint-connections --filters Name=service-id,Values="$SVC" --query 'VpcEndpointConnections[].[VpcEndpointId,VpcEndpointOwner,VpcEndpointState]' --output table
18aws ec2 accept-vpc-endpoint-connections --service-id "$SVC" --vpc-endpoint-ids vpce-0def4567890abcdef
19
20# provider: private DNS name + verification record values
21aws ec2 modify-vpc-endpoint-service-configuration --service-id "$SVC" --private-dns-name api.jhooq.com
22aws ec2 describe-vpc-endpoint-service-configurations --service-ids "$SVC" --query 'ServiceConfigurations[0].PrivateDnsNameConfiguration'
23aws ec2 start-vpc-endpoint-service-private-dns-verification --service-id "$SVC"
24
25# consumer: turn on private DNS for the endpoint
26aws ec2 modify-vpc-endpoint --vpc-endpoint-id vpce-0def4567890abcdef --private-dns-enabled
Both sides in Terraform. Note that the consumer VPC deliberately has the same 10.0.0.0/16 as the provider:
1# provider side
2resource "aws_lb" "internal" {
3 name = "jhooq-service-nlb"
4 internal = true
5 load_balancer_type = "network"
6 subnets = aws_subnet.provider[*].id # one per AZ consumers will use
7}
8
9resource "aws_vpc_endpoint_service" "this" {
10 acceptance_required = true # every consumer waits for Accept
11 network_load_balancer_arns = [aws_lb.internal.arn]
12 allowed_principals = ["arn:aws:iam::111122223333:root"]
13 private_dns_name = "api.example.com" # needs the TXT verification
14 supported_ip_address_types = ["ipv4"]
15}
16
17# consumer side (same account here; use a provider alias for another account)
18resource "aws_vpc" "consumer" {
19 cidr_block = "10.0.0.0/16" # identical to the provider VPC on purpose
20 enable_dns_support = true
21 enable_dns_hostnames = true
22}
23
24resource "aws_vpc_endpoint" "consumer" {
25 vpc_id = aws_vpc.consumer.id
26 service_name = aws_vpc_endpoint_service.this.service_name
27 vpc_endpoint_type = "Interface"
28 subnet_ids = aws_subnet.consumer[*].id
29 security_group_ids = [aws_security_group.endpoint.id] # allow the port from the consumer VPC
30 private_dns_enabled = true
31}
Validated and planned on 2026-10-17 with Terraform 1.16.2 and AWS provider 6.69.1 (mock credentials, nothing created):
1$ terraform validate
2Success! The configuration is valid.
3
4$ terraform plan
5 # aws_lb.internal will be created
6 # aws_lb_listener.tcp80 will be created
7 # aws_lb_target_group.app will be created
8 # aws_security_group.endpoint will be created
9 # aws_vpc.consumer will be created
10 # aws_vpc.provider will be created
11 # aws_vpc_endpoint.consumer will be created
12 # aws_vpc_endpoint_service.this will be created
13 + acceptance_required = true
14 + allowed_principals = ["arn:aws:iam::111122223333:root"]
15 + private_dns_name = "api.example.com"
16 ...
17Plan: 12 to add, 0 to change, 0 to destroy.
Two VPCs with the same CIDR, no peering, no routes, and the plan is clean; with aws_vpc_peering_connection the same pair fails at apply. Add aws_route53_record for the TXT verification and aws_vpc_endpoint_connection_accepter to approve the consumer; for a second account use a provider alias as in Terraform and AWS multi-account setup. The resources are documented at aws_vpc_endpoint_service and aws_vpc_endpoint.
13. Common PrivateLink errors and how to fix them
1. Service name could not be verified when the consumer creates the endpoint - The consumer's principal is not in Allow principals, the service name has a typo, or the region differs (the service name embeds the region). Add arn:aws:iam::<consumer-account>:root.
2. The endpoint stays Pending acceptance - Acceptance is required and the provider has not accepted. Provider: Endpoint connections → Accept. Consider auto-acceptance for internal consumers.
3. The endpoint is Available but curl times out - In order: the consumer endpoint security group allows the port from the consumer subnet? The provider NLB security group allows the port - from the consumer's client IPs, or Enforce inbound rules on PrivateLink traffic is off? The NLB targets are healthy? The consumer ENI is in an AZ where the NLB has a subnet?
4. Works from one consumer AZ, not from another - The NLB has no subnet in that AZ (the service lists its AZs); add the AZ to the NLB or enable cross-zone load balancing on it.
5. Rejected state - The provider rejected or later deleted the connection, or removed the NLB from the service. Ask the provider; the consumer must create a new endpoint after a fix.
6. Private DNS verification stuck at pendingVerification / failed - TXT record name wrong (the DNS provider appended the domain twice - add the trailing dot), value changed to lowercase, underscores not supported (omit the label and put the TXT on the apex), or not yet propagated. nslookup -type=TXT against the zone's own name server, then Verify domain ownership.
7. api.jhooq.com resolves to the public IP inside the consumer VPC - The consumer did not enable private DNS on the endpoint, or the consumer VPC has DNS hostnames/resolution off, or an existing private hosted zone for jhooq.com in that VPC overrides it.
8. The application logs show the NLB's IP for every request - Expected. Turn on proxy protocol v2 (section 9) and parse the header.
9. Garbage / 400 Bad Request right after enabling proxy protocol - The targets do not parse the proxy protocol header. Configure nginx/HAProxy for it, or turn it off.
10. You cannot associate the load balancer with more than one endpoint service - One NLB per endpoint service. Create a second NLB for a second service.
11. Cross-region endpoint creation fails - The provider did not add that region under Service Regions, or the consumer did not tick Enable Cross Region endpoint.
14. What broke when I ran this
The console build and the curl test are from my recording of 17 February 2024 in Frankfurt; the Terraform plan and the prices are from 2026-10-17.
1. The first curl through the endpoint hung. Endpoint Available, connection accepted, DNS resolving, and curl sat there until I pressed Ctrl-C. The provider instance's security group (launch-wizard-2) had one inbound rule, SSH from anywhere, and nothing for port 80. The NLB had forwarded the request faithfully to a target that dropped it. Adding an HTTP rule fixed it on the next attempt. PrivateLink hides the network path, so the first place to look when a connection hangs is the last security group in the chain, on the target.

2. The endpoint stayed in Pending acceptance until I switched roles. I had ticked Acceptance required on the service, so the consumer's endpoint waited for the provider to accept it. In a one-account demo that is a trip to another console page; in a real two-account setup it is a message to another team, and the endpoint is unusable until they act. Decide deliberately whether you want that gate.
3. The recording's VPC ranges would never have peered. I used 11.0.0.0/16 and 21.0.0.0/16, public ranges that read well on camera, and because PrivateLink never routes between the VPCs it did not matter. The Terraform makes the point harder: both VPCs are 10.0.0.0/16 and the plan is clean. The planner link in section 1 shows the same pair flagged as an overlap, which is the right answer for every other connectivity option.
4. The plan took 52 seconds for 12 resources. The provider start-up again, plus the load balancer resources, which the AWS provider validates more heavily than VPC primitives. Nothing was created, so none of that was AWS.
15. Conclusion
To summarise Part-20 -
- PrivateLink exposes one service privately to other VPCs and accounts: the provider puts it behind an internal NLB, creates an endpoint service, allows principals and accepts connections; each consumer creates an interface endpoint and gets a private IP in its own subnet - no peering, no routes, no CIDR conflicts, one-way traffic.
- The consumer uses the AWS-generated endpoint DNS name, or your private DNS name after a one-time TXT verification of the domain - which lets the same hostname work inside and outside the VPC.
- Targets see the NLB's IP; proxy protocol v2 carries the consumer's client IP and endpoint ID.
- It works cross-account natively, cross-region via Service Regions, and is the mechanism behind every "private connectivity" SaaS offer.
- The consumer pays endpoint-hours and GB; the provider pays for the NLB.
The official references are share your services through PrivateLink, create an endpoint service, manage DNS names and configure an endpoint service. With networking covered end to end, the series turns to governance at scale - Part-24, AWS Control Tower.
Did this save you a debugging session? Stay in the loop -
- Subscribe on YouTube - every post here has a screen-recorded companion video.
- Code on GitHub - the repositories, Terraform and scripts behind these posts.
AWS step by step series -
- Part-1 : AWS IAM user - create a user, group, policy, access keys and MFA
- Part-2 : AWS Organizations - multi-account setup, OUs and SCPs
- Part-3 : AWS assume IAM role - trust policy, switch role in console and CLI
- Part-4 : How to launch an EC2 instance - key pair, security group, SSH
- Part-5 : AWS VPC - public and private subnets, Internet Gateway, NAT Gateway, route tables
- Part-8 : EC2 launch template - versions, default version, source template, SSM parameter AMI
- Part-10 : EC2 Auto Scaling - launch template, Auto Scaling group, target tracking, ALB
- Part-11 : AWS WAF - web ACL, managed rules, rate limiting, geo blocking
- Part-12 : AWS VPC Peering - connect two VPCs, routes, security groups, DNS
- Part-13 : AWS Transit Gateway - hub-and-spoke for many VPCs and on-premises
- Part-14 : AWS NAT Gateway deep dive - public vs private, limits, cost, troubleshooting
- Part-15 : Amazon Route 53 - hosted zones, records, alias, routing policies, health checks
- Part-16 : AWS security groups - inbound and outbound rules, stateful, referencing, quotas
- Part-16 : AWS Certificate Manager - free TLS certificates for ALB, CloudFront and API Gateway
- Part-17 : AWS Lambda - function URLs, environment variables and layers
- Part-18 : Network Load Balancer - setup, and ALB vs NLB
- Part-19 : VPC endpoints - gateway and interface endpoints (PrivateLink) instead of NAT
- Part-20 : AWS PrivateLink - publish your own service with an endpoint service and NLB
- Part-20 : Amazon EBS volumes - types, attach, mount, resize, snapshots, encryption
- Part-21 : VPC Flow Logs - CloudWatch Logs, S3, record format, Logs Insights, Athena
- Part-21 : EC2 Spot Instances - pricing, interruptions, mixed instances groups
- Part-23 : AWS Global Accelerator - static anycast IPs in front of ALBs in two regions, traffic dials, weights
- Part-24 : AWS Control Tower - landing zone, controls, Account Factory, Identity Center
- Part-25 : AWS Cloud WAN - global network, core network policy, dev/prod/shared segments, tag-based attachments across three regions
Networking fundamentals -
- What is a VPC and a subnet? AWS networking in five minutes
- What is CIDR? Calculate IP ranges for VPCs and subnets
- VPC Subnet Planner - the free tool I use to size the VPC and subnet CIDRs in every part of this series (AWS, Azure, GCP rules built in)
- What is NAT? Static NAT, dynamic NAT and PAT explained
More AWS guides -
- What is AWS CloudFormation? Templates, stacks, change sets, drift, StackSets
- Learn AWS S3 - the complete course
- AWS API Gateway - REST API with Lambda, authorizers, Terraform
- AWS Advanced Networking Specialty (ANS-C01) - course companion
- AWS ECS and Fargate - how to deploy a Docker container
- AWS S3 - how to host a static website
- Terraform create EC2 instance on AWS
- Terraform AWS IAM - users, roles and policies
- Terraform and AWS multi-account setup
- Terraform - setting up an ALB and SSL