rights reserved. Express.js – aws-serverless-express の振る舞い users Amazon API Gateway AWS Lambda HTML Page RESTful Access Image GET /users GET /sam GET / text/html application/json image/*
rights reserved. Express.js – aws-serverless-express の振る舞い users Amazon API Gateway AWS Lambda HTML Page RESTful Access Image GET /users GET /sam GET / text/html application/json image/* ✔ ✔ ✔
rights reserved. awslabs/aws-serverless-java-container 参考 https://github.com/awslabs/aws-serverless-java-container/wiki API Gateway と Lambda で Spring Jersey Spark などを動作させるための ラッパーライブラリ
rights reserved. Spring Framework – pet-store on Serverless ソースコードの取得 $ git clone https://github.com/awslabs/aws-serverless-java-container $ cd aws-serverless-java-container/samples/spring/pet-store $ ls -1 README.md output-sam.yaml pom.xml sam.yaml src target
rights reserved. Spring Framework – pet-store on Serverless Maven で package を作成 $ mvn package [INFO] Scanning for projects... [INFO] [INFO] ---------------------------------------------------------- [INFO] Building Spring example for the aws-serverless-java-container library 1.0-SNAPSHOT ...(snip)... [INFO] ---------------------------------------------------------- [INFO] BUILD SUCCESS [INFO] ---------------------------------------------------------- [INFO] Total time: 39.695 s [INFO] Finished at: 2017-05-25T15:26:32+09:00 [INFO] Final Memory: 33M/243M [INFO] ----------------------------------------------------------
rights reserved. Spring Framework – How It Works バックエンドの構成、原理 → Express.js の example とあまり変わらないので割愛 API Gateway は /{proxy+} ANY で、 Lambda Proxy Integration で… awslabs/aws-serverless-java-container spring, sample/pet-store の (ソフトウェアとしての)アーキテクチャ俯瞰 クラスレベル パッケージレベル