This lab walks you through the steps to create an API Gateway with two different stages and integrate it to two different lambda functions.
You will practice using Amazon API Gateway.
Duration: 75 minutes.
AWS Region: us-east-1 (N. Virginia).
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
APIs act as the front door for applications to access data, business logic, or functionality from your backend services.
API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management.
Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.
AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.
With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.
Log into the AWS Management Console.
Create an IAM Role for EC2 instances.
Create an EC2 instance.
Create two Lambda Function.
Create a new API.
Create a Resource.
Create a Method.
Run the CLI command to give lambda permissions to API using EC2 instance.
Deploy API Gateway with two different stages.
Add stage variables to both stages.
Test the API Gateway.