Building Private APIs Using API Gateway

Building Private APIs Using API Gateway
Building Private APIs Using API Gateway

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.

8 Tasks

beginner

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of private RESTful APIs in API Gateway
The ability to restrict the API access inside a VPC
Hands-on experience creating private APIs through the API Gateway
Hands-on experience invoking a Lambda function through the API Gateway

Technologies
Lambda logoLambda
API Gateway logoAPI Gateway
Skills Covered
Using AWS Cloud Services
Cloud Lab Overview

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:

Architecture diagram
Architecture diagram
Cloud Lab Tasks
1.Introduction
Get Started
2.Create the Required Resources
Create a VPC and a Security Group
Create a VPC Endpoint
Create a Lambda Function
3.Deploy and Test Private APIs
Create a Private API
Test the API in a Cloud9 IDE
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

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.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

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.

Felipe Matheus
TestimonialsImg

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

Adina Ong
TestimonialsImg

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.

Clifford Fajardo
TestimonialsImg

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.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

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.

Felipe Matheus
TestimonialsImg

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

Adina Ong
TestimonialsImg

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.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image