Amazon API Gateway - Part1
Amazon Cloud Concepts Learning --> Day15
Amazon API Gateway
Developers can easily construct, publish, maintain, monitor, and protect APIs at any scale with the help of Amazon API Gateway, a fully managed service.
APIs serve as the "front door" via which apps may access your backend services' data, business logic, or capabilities.
Real-time two-way communication apps may be made possible with the help of API Gateway by developing WebSocket and RESTful APIs.
API Gateway facilitates web apps and serverless and containerized workloads.
Amazon API Gateway Basic Concepts
API Gateway Rest API
A group of HTTP functions and resources that are combined with other AWS services, Lambda functions, and backend HTTP endpoints.
API Gateway HTTP API
A group of methods and routes coupled with Lambda functions or backend HTTP endpoints.
API Gateway WebSocket API
A group of Lambda functions, WebSocket routes, and route keys that are combined with other AWS services, including HTTP destinations.
API Deployment
A point-in-time capture of your API Gateway API. The deployment must be connected to one or more API stages for clients to be able to utilize it.
API Developer
The API Gateway deployment is owned by your AWS account (for example, a service provider that also provides programmatic access).
API endpoint
An API Gateway hostname that is deployed to a certain Region. The hostname is of the form {api-id}.execute-api.{region}.amazonaws.com. Supported endpoints types
Edge Optimized API Endpoint
In situations when your clients are dispersed geographically, an edge-optimized API endpoint might be helpful since it forwards requests to the closest CloudFront Point of Presence (POP). For API Gateway REST APIs, this is the default endpoint type.
Private API Endpoint
A client can safely access private API resources within a VPC using an API endpoint that is accessible through interface VPC endpoints. REST API is supported by it.
Regional API Endpoint
The host name of an API that is set up in the designated region and meant to provide services to customers in the same Amazon region, such EC2 instances. Both REST and HTTP API are supported.
API Key
Your REST or WebSocket API user's unique alphanumeric string, which API Gateway uses to identify them.
API Stage
A sensible pointer to one of your API's lifecycle states (dev, prod, beta, v2, etc.). The stage name and API ID are used to identify different API stages.
App Developer
A developer of apps who works with the API that you, the API developer, have deployed, and who might or might not have an AWS account. Your clients are app developers. Usually, an API key is used to identify an app developer.
Integration Request
An API Gateway's internal interface for a WebSocket API route or REST API method that allows you to map a route request's body or a method request's parameters and body to the formats needed by the backend.
Integration Response
The internal interface of an API Gateway REST API method or WebSocket API route that allows you to map the content, headers, and status codes received from the backend to the response format sent back to the client application.
Method Request
The API Gateway's public interface for an API method specifies the body and parameters that an app developer must provide in requests to use the API to reach the backend.
Method Response
An app developer should anticipate certain headers, body models, and status codes in answers from a REST API, as specified by the API's public interface.
Mock Integration
An integration backend is not required in a mock integration as API answers are generated straight from the API Gateway. The way API Gateway reacts to a simulated integration request is up to you as an API developer.
API Gateway Features
Stateless (HTTP and REST) and Stateful (WebSocket) API support.
Use canary release deployments to safely implement updates.
Strong, adaptable authentication systems via Lambda authorizer functions, Amazon Cognito user pools, and AWS Identity and Access Management rules.
Setting alarms and access to execution and access logs via Cloud Watch
API use and updates are tracked and recorded by CloudTrail.
Integrate AWS WAF to defend your APIs from popular online vulnerabilities.
Connectivity with AWS X-Ray to analyze and rank performance latency.
Selecting between HTTP and REST APIs
A few of the fundamental aspects of both HTTP and REST APIs are compiled in the table below
Feature | REST APIs | HTTP APIs |
Endpoint Types | Edge-optimized, Regional & Private | Regional |
Security | AWS WAF | -- |
Authorization | IAM, Resource Policies & JWT | IAM & JWT |
Monitoring | CloudWatch Metrics, X-Ray & Execution Log | IAM & JWT |
Integration | Provides Mock Integration & AWS Lambda functions | AWS Lambda functions |
Development | Canary Release deployments & CORS configuration | CORS configuration |
"Thank you for reading! If you found this blog helpful, don't forget to subscribe and follow for more insightful content. Your support keeps me motivated to bring you valuable insights. Stay updated and never miss out on our latest posts. Feel free to leave comments or suggestions for future topics. Happy learning!"
https://awslearner.hashnode.dev/amazon-web-services-via-category
Subscribe to my newsletter
Read articles from Utkarsh Rastogi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Utkarsh Rastogi
Utkarsh Rastogi
๐จโ๐ป AWS Cloud Engineer | Around 6 years of Corporate Experience | Driving Innovation in Cloud Solutions ๐ง Day-to-Day Tasks: Specialize in creating AWS infrastructure for Migration Projects. Leveraging services such as S3, SNS, SQS, IAM, Lambda, System Manager, Kinesis, OpenSearch, Cognito, Storage Gateway, Cloud Watch, API Gateway, AWS Event Scheduler, Secret Manager, ECS, Application Load Balancer, VPC among others. Additionally, I excel in crafting Splunk Dashboards and implementing alerting mechanisms for Cloud Watch logs to monitor failures. My approach involves constructing AWS infrastructure using the Serverless framework and Cloud Formation templates, while automating tasks through Boto3 (Python Scripting) Lambdas. ๐ฏ Passion: I am deeply passionate about continuously learning new technologies and eagerly anticipate the transformative impact of cloud computing on the tech landscape. ๐ง Connect: Feel free to reach out to me at awslearningoals@gmail.com. Let's connect and explore potential collaborations! https://www.linkedin.com/in/rastogiutkarsh/