API Gateway
● 認証なし、IAM、共通のAPIKey(HTTPのx-api-keyヘッダ)による認証
フロント
(js)
API Gateway
(フロントエンド用)
Mock
API Gateway
(バックエンド用)
API Gateway
(外部API用)
リバプロ
外部API
基本的に全 APIがIAM認証
ログインなど一部の APIは認証なし
公開しないので共通の API Key認証公開しないので共通の API Key認証
8.
API Gateway
● APIのまるごとクローンや、Stage機能でバージョン管理可能
○Stageごとにキャッシュ、スロットリング、変数によるパラメータなどの設定
○ フェージングによる環境の分岐も Stage機能で楽だった
フロント
(js)
API Gateway
(フロントエンド用)
Mock
API Gateway
(バックエンド用)
API Gateway
(外部API用)
リバプロ
外部API
development
staging
production
development
staging
production
development
staging
production
9.
API Gateway
● swaggerによるコード化、エクスポートやインポート
●そこそこの規模でLambdaと一緒に使うならフレームワークの併用を強く推奨
○ 特にMapping Templateを利用する場合などはバージョン管理必須
AWS SAM
※特にAPI Gatewayをリバプロで動かす場合は Mapping Templateが複雑になりやすい
Lamvery
chalice
10.
API Gateway
● 他社クラウドとの比較
Azure
●API Managementを2014年頃から提供
● 出来ることはAPI Gatewayとよく似ているがFunctionsが実行できない
GCP
● Google Cloud Endpointsを2013年頃から提供
● Google App Engineがバックエンドに使用出来る
● 2016年9月にApigeeを買収
Bluemix
● 2015年にStrongLoopを買収し、2016年頃からIBM API Connectを提供
● loopbackというAPIフレームワークを使用して各APIを作成する
Lambda
● API GatewayのStageとLambdaのAliasをそろえることで各環境を管理
フロント
(js)
APIGateway
(フロントエンド用)
Mock
API Gateway
(バックエンド用)
API Gateway
(外部API用)
リバプロ
外部API
development
staging
production
development
staging
production
development
staging
production
development
staging
production
development
staging
production