Aws API Gateway
Aws API Gateway
GATEWAY
DECEMBER 15, 2016
M U H A M M E D YA L Ç I N
CONTENT
• Amazon API Gateway helps developers to create and manage APIs to back-end systems
running on Amazon EC2, AWS Lambda or any pubicly addressable web service.
• With Amazon API Gateway, you can generate custom client SDKs for your APIs, to connect
your back-end systems to mobile, web and server applications or services.
• The API you create in API Gateway consists of a set of resources and methods.
BENEFITS
• A resource is a logical entity that can be accessed through a resource path using the API.
• A resource can have one or more operations that are defined by appropriate HTTP verbs such as GET, POST, and
DELETE.
• A combination of a resource path and an operation identify a method in the API.
• Each method corresponds to a REST API request submitted by the user of your API and the corresponding response
returned to the user.
• API Gateway integrates the method with a targeted back end by mapping the method request to an integration
request acceptable by the back end and then mapping the integration response from the back end to the method
response returned to the user.
• As an API developer, you can configure how methods are mapped to integrations and vice versa by stipulating what
parameters to use and specifying mapping templates to transform payloads of given data models.
CREATE NEW API
CREATE RESOURCE
• Click Integration Request. Click Body Mapping Templates. Add mapping templates. GET
method can have a parameters like a query string. Besides POST requests send data from body
part likewise.
• GET POST
DEPLOY API
• Click Action and select Deploy API. Click [New Stage]. Deploy new stage.
CON’T
• API Calls
– $3.50 per million API calls received, plus the cost of data transfer out, in gigabytes.
• Data Transfer Costs
– $0.09/GB for the first 10 TB
– $0.085/GB for the next 40 TB
– $0.07/GB for the next 100 TB
– $0.05/GB for the next 350 TB
CON’T
• Caching
CON’T
• Pricing Example:
– An API that receives five million API calls per month, with each API call returning responses of
3 kilobytes (KB) in size with no caching.
– Example below reflects pricing for US East, US West, EU (Ireland)
• https://aws.amazon.com/api-gateway/
• https://aws.amazon.com/api-gateway/pricing/
• http://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html
• https://aws.amazon.com/blogs/aws/amazon-api-gateway-build-and-run-scalable-application-ba
ckends/