To ensure security, our backend services running in Private Subnets should not access key AWS services over the public internet. Instead, we use AWS PrivateLink (VPC Endpoints) to keep this traffic within the AWS network.
We will create 4 Endpoints:
We will start by creating the endpoint for ECR Docker (ecr.dkr). The process is identical for ECR API (ecr.api) and CloudWatch (logs).
Step 1: Service Selection
ecr-endpoint (for Docker).ecr.dkr and select com.amazonaws.ap-southeast-1.ecr.dkr.
Step 2: VPC & Subnets
band-up-vpc.private-app-subnet-1 and private-app-subnet-2).
Step 3: Security Group


Step 4: Repeat for ECR API and CloudWatch Repeat the steps above to create two more Interface Endpoints:
ecr.api -> Name: ecr-api-endpoint.logs -> Name: cloudwatch-endpoint.For Amazon S3, we use a Gateway Endpoint, which is cost-effective and uses routing tables instead of network interfaces.
s3-endpoint.s3 and select com.amazonaws.ap-southeast-1.s3 (Type: Gateway).band-up-vpc.Once completed, navigate to the Endpoints list. You should see 4 active endpoints ensuring secure connectivity for your infrastructure.
ecr-endpoint (Interface)ecr-api-endpoint (Interface)cloudwatch-endpoint (Interface)s3-endpoint (Gateway)