Cross Account Private API Access via Public Network Load Balancer

Network Load balancer → VPC Endpoint → API Gateway → AWS Lambda

Cross Account Private API Access via Public Network Load Balancer.

This sample pattern allows users from one account to access their Private REST APIs present in same/cross account over the internet.
This facilitates abstraction of network resources (like load balancers, virtual private clouds, endpoints) & application resources (like lambda, api gateway) into separate individual management accounts.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/public-nlb-or-alb-private-api-cfn

Deploy

sam deploy --guided


Testing

See the repo for detailed testing notes.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Shivam Rajawat

I am a Cloud Support Engineer (Serverless) at AWS and I love to solve complex problems.

Follow on LinkedIn