SlideShare a Scribd company logo
REST API / Microservices ?
REST API ?
- Security
- Cache
- CORS
- Request Tracking
- Throttling
- Clients
- Quota
- Developer Portal
- ...
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS API GATEWAY
Łukasz Marchewka @ scalac
About me
- Java Developer 6y
- Scala Developer 6y
- Software Architect
- Reactive Systems
- Functional Programing
- Big Data
- Fast Data
Client - Service
Client - API Gateway - Service
Microservices without API Gateway
Microservices with API Gateway
Microservices with API Gateway
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
Solutions
- Kong
- Tyk.io
- APIGee
- AWS Gateway
- Azure Gateway
- ...
AWS API Gateway
Advantages
- Cloud vendor PaaS
- OpenAPI 3 / Swagger 2
- Management (SDK, Console, REST API)
- Simple
- Support for WebSockets
- Monitoring
- SDK Generator
- Integration with Lambda & other AWS services
Architecture
AWS Api Gateway by Łukasz Marchewka Scalacc
Demo
Scope
- Basic example
- Mocking
- Validation
- Mapping
- Security
- Integration with Lamba
- Usage Plans & Clients
How to start
- Create AWS account
- Configure access to API Gateway & Lambda
Simple API
Simple API
- API: catalog
- Method: GET /pets => GET
https://petstore.swagger.io/v2/pet/findByStatus?status=available
- Model
- Mapping template
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
CORS
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
Validation & Mapping
Validation & Mapping
- API: management
- Method: POST /pets => POST https://petstore.swagger.io/v2/pet
- Validation
- Method: DELETE /pet/{id} => DELETE =>
https://petstore.swagger.io/v2/pet/{id}
- Request mapping
- Response mapping
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
Security
Security
- Lambda Authorizer
- Authentication
- Resource Policy
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
Clients
Clients
- API Keys
- Usage Plan
- Throttling
- Quota
AWS Api Gateway by Łukasz Marchewka Scalacc
Serverless
Serverless
More
- Custom Domain
- Client Certificate
- Logs (Cloud Watch)
- Monitoring
- Developer Portal *
- Resource Policy (ip filter)
- Stage Variable
- SDK Generator
- Canary Release
Problems
- OpenAPI 3 not fully implemented
- Difficult to debug
- A lot of boilerplate
- Meaningless errors from AWS
- Limitations
Kong
Kong
- Open Source
- built on Nginx
- Custom plugins - Lua
Apigee
Apigee
- From Google
- Plugins out of box
- Custom plugins - JavaScript
- Debug friendly
- Good documentation
- Missing Management API
Apigee
Q & A
Łukasz Marchewka
https://github.com/LukaszMarchewka/aws-api-gateway

More Related Content

AWS Api Gateway by Łukasz Marchewka Scalacc