Amazon API Gateway is a fully managed service that makes it easy for developers to publish, maintain, monitor, secure, and operate APIs at any scale. It's a pay-as-you-go service that takes care of all of the undifferentiated heavy lifting involved in securely and reliably running APIs at scale.
Support for RESTful APIs and WebSocket APIs
With API Gateway, you can create RESTful APIs using either HTTP APIs or REST APIs. HTTP APIs are the best way to build APIs that do not require API management features. HTTP APIs are optimized for serverless workloads and HTTP backends—they offer up to 71% cost savings and 60% latency reduction compared to REST APIs from API Gateway.For workloads that require API proxy functionality and API management features in a single solution, such as usage plans and API keys, API Gateway offers REST APIs. To see a side-by-side comparison of supported features for HTTP APIs and REST APIs, visit our documentation. To build real-time two-way communication applications, such as chat apps and streaming dashboards, use WebSocket APIs. To learn more about RESTful APIs and WebSocket APIs from API Gateway, visit our FAQ page.
Private integrations with AWS ELB and AWS Cloud Map
With API Gateway, you can route requests to private AWS Elastic Load Balancers (ELB). Using HTTP APIs, you can build APIs for services behind private ALBs, private NLBs, and IP-based services registered in Cloud Map, such as ECS tasks.
API Gateway helps you manage traffic to your backend systems by allowing you to set throttling rules based on the number of requests per second for each HTTP method in your APIs. API Gateway handles any level of traffic received by an API, so you are free to focus on your business logic and services rather than maintaining infrastructure. If you’re using REST APIs, you can also set up a cache with customizable keys and time-to-live in seconds for your API data to avoid hitting your backend services for each request.
Easy API creation and deployment
With API Gateway, you can quickly and easily create a custom API to your code running in AWS Lambda and then call the Lambda code from your API. API Gateway can execute AWS Lambda code in your account, start AWS Step Functions state machines, or make calls to AWS Elastic Beanstalk, Amazon EC2, or web services outside of AWS with publicly accessible HTTP endpoints. Using the API Gateway console, you can define your REST API and its associated resources and methods, manage your API lifecycle, generate your client SDKs, and view API metrics.
API operations monitoring
After an API is deployed and in use, API Gateway provides you with a dashboard to visually monitor calls to the services. The API Gateway console is integrated with Amazon CloudWatch, so you get backend performance metrics such as API calls, latency, and error rates. Because API Gateway uses CloudWatch to record monitoring information, you can set up custom alarms on API Gateway APIs. API Gateway can also log API execution errors to CloudWatch Logs to make debugging easier.
To authorize and verify API requests to AWS services, API Gateway can help you leverage signature version 4 for REST APIs and WebSocket APIs. Using signature version 4 authentication, you can use AWS Identity and Access Management (IAM) and access policies to authorize access to your APIs and all your other AWS resources. You can also use AWS Lambda functions to verify and authorize bearer tokens such as JWT tokens or SAML assertions.
API keys for third-party developers
If you’re using REST APIs, API Gateway helps you manage the ecosystem of third-party developers accessing your APIs. You can create API keys on API Gateway, set fine-grained access permissions on each API key, and distribute them to third-party developers to access your APIs. You can also define plans that set throttling and request quota limits for each individual API key. The use of API keys is completely optional and must be enabled on a per-method level.
API lifecycle management
If you're using REST APIs, API Gateway lets you run multiple versions of the same API simultaneously so that applications can continue to call previous API versions even after the latest versions are published. API Gateway also helps you manage multiple release stages for each API version, such as alpha, beta, and production. Each API stage can be configured to interact with different backend endpoints based on your API setup. Specific stages and versions of an API can be associated with a custom domain name and managed through API Gateway. Stage and version management allow you to easily test new API versions that enhance or add new functionality to earlier API releases, and ensures backward-compatibility as user communities transition to adopt the latest release.