This course introduces Amazon API Gateway and teaches you the basics of how to create and deploy application programming interfaces (APIs). You will learn about options for managing and metering access to your APIs and integrating them with AWS Lambda.
- Course level: Fundamental
- Duration: 120 minutes
Activities
This course includes presentations and assessments.
Course objectives
In this course, you learn to:
- Identify initial use cases where API Gateway and Lambda can decouple a larger monolith.
- Identify a plan for your application for managing APIs that includes endpoint selection, caching configurations, authorization methods, usage plans, and deployment stages.
- Identify how to build real-time messaging communication applications using WebSocket APIs.
- Use the API Gateway console to create an API from scratch, test it with a mock endpoint, and deploy it using an available authorization option.
- Use Amazon CloudWatch to analyze the traffic on your deployed API and identify opportunities or improvements, validations, responses, and mapping.
- Use API Gateway as an event source for a Lambda function using Lambda Aliases and API Gateway Stage Variables.
Intended audience
This course is intended for:
- Software developers who are familiar with microservice and API-based development but new to serverless
- Anyone interested in understanding the basics of how API Gateway is used in front of Lambda
Prerequisites
We recommend that attendees of this course have:
- Some coding experience
- Familiarity with cloud architecture
- Awareness of other Amazon Web Services (AWS) services including Amazon Simple Storage Service (Amazon S3), Amazon DynamoDB, and AWS Lambda
- Understanding of API-based development
Course outline
Module 1: Introduction to API Gateway
- The challenges of API management
- Using API Gateway as the front door for APIs
- API Gateway features
- API Gateway architecture
- Selecting the best API type for your use case
Module 2: Designing WebSocket APIs
- Real-time message communication with WebSocket APIs
- Developing a WebSocket API in API Gateway
- Maintaining connections to WebSocket APIs
Module 3: Designing REST APIs
- REST APIs
- API Gateway REST API endpoint types
- API Gateway optional cache
- Pricing considerations for REST APIs
Module 4: Building and Deploying APIs with API Gateway
- Anatomy of the API call
- Steps to build an API with API Gateway
- API stages
- Building and deploying best practices
Module 5: Managing API Access
- Managing access to APIs
- Authorization for API Gateway
- Authorizing with IAM
- Lambda Authorizers
- Cognito Authorizers
- Throttling and usage plans
- IAM permissions
- Resource policies
Module 6: Monitoring and Troubleshooting
- CloudWatch metrics for API Gateway
- Amazon CloudWatch Logs for API Gateway
- Monitoring with X-Ray and CloudTrail
Module 7: Data Mapping and Request Validation
- Data transformations with mapping templates
- Handling errors with Gateway Responses
- Offloading request validation to API Gateway
Module 8: Wrap-up and Next Steps
- Wrap-up
- Additional resources
- Next steps