CLOUD LABS
Building Private APIs Using API Gateway
In this hands-on Cloud Lab, you’ll learn about private RESTful APIs in Amazon API Gateway. These private APIs can only be accessed through resources inside a VPC through a VPC endpoint.
beginner
Certificate of Completion
Learning Objectives
Amazon API Gateway is an Amazon Web Service that allows us to create, deploy, and manage different types of APIs, such as REST and WebSocket. It also allows you to create private REST APIs that can only be accessed through resources inside a Virtual Private Cloud (VPC) through a VPC endpoint.
In this Cloud Lab, you’ll first create a VPC, attach a security group to it, and then add a VPC endpoint. You’ll then create a Lambda function that will return a simple string when the function is invoked. You’ll use the API Gateway to create and configure a private API so that it can only be accessed by the resources inside your VPC and invokes your Lambda function when its GET method is called. Finally, you’ll create an IDE through Cloud9 inside your VPC and use it to send a request to your private API.
After completing this Cloud Lab, you’ll have a strong knowledge of private APIs in API Gateway and can create your private RESTful APIs. You can configure these APIs to allow resources inside a specific VPC to access your APIs.
The following is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:
Before you start...
Try these optional labs before starting this lab.
Relevant Course
Use the following content to review prerequisites or explore specific concepts in detail.
Frequently Asked Questions
Is API Gateway public or private?
Amazon API Gateway supports both public and private APIs.
What is an example of a private API?
A private API in Amazon API Gateway is an API that is accessible only within your Amazon virtual private cloud (VPC). Suppose you have a microservices architecture where certain services, such as a payment processing service, should not be exposed to the public internet. By creating a private API, you can ensure that only resources within your VPC can access this service, thereby maintaining a secure environment.
What is the difference between open API and private API?
Often called public APIs, open APIs allow other developers to create apps that communicate with the service via the public internet, increasing its capability and reach. While the private APIs are used to enhance system integration, data sharing, and internal processes to maintain a secure environment.
Trusted by 1.4 million developers working at companies including
Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

I highly recommend Educative. The courses are well organized and easy to understand.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

I highly recommend Educative. The courses are well organized and easy to understand.

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Get access to Educative Cloud Labs
Copyright ©2025 Educative, Inc. All rights reserved.