Securing APIs and Creating Usage Plans on AWS API Gateway

Securing APIs and Creating Usage Plans on AWS API Gateway
Securing APIs and Creating Usage Plans on AWS API Gateway

CLOUD LABS



Securing APIs and Creating Usage Plans on AWS API Gateway

In this Cloud Lab, you’ll learn to secure APIs on Amazon API Gateway with API keys, usage plans, and custom authorizers.

12 Tasks

intermediate

2hr 30m

Certificate of Completion

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

Learning Objectives

Thorough understanding of securing APIs using API Gateway
An understanding of API keys, usage plans, and their application to secure APIs
The ability to automate the API key generation process using Lambda and DynamoDB services
The ability to set up your own custom authorizers

Technologies
Lambda logoLambda
DynamoDB logoDynamoDB
API Gateway logoAPI Gateway
Cloud Lab Overview

API Gateway is an AWS service where you can create, manage, and deploy different APIs. One of the key aspects of setting up an API includes securing it. API Gateway offers several implementations to secure APIs, including API keys, usage plans, and custom authorizers where a custom authorization process can be implemented.

In this Cloud Lab, you’ll learn to create and customize API keys and usage plans on API Gateway. You’ll learn to automate the API key generation process for your API users. and can implement your own authorization logic using a Lambda function to set up a custom authorizer.

By the end of this Cloud Lab, you’ll have hands-on experience developing APIs on API Gateway and gained a working knowledge of the various tools you can use to secure them.

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
Getting Started
2.Set Up a REST API
Create a DynamoDB Table
Create a Lambda Function to Provide API Data
Set Up a REST API
3.Secure the API with API Keys
Create an API Key
Create a Usage Plan
4.Set Up an API Endpoint to Generate API Keys
Create a Lambda Function to Generate API Keys
Set Up an API POST Method to Generate API Keys
5.Custom Authorization on API Gateway
Create a Lambda Function for Authorization
Attach the Lambda Authorizer to API Gateway
6.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 Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like