- Serverless Design Patterns and Best Practices
- Brian Zambrano
- 128字
- 2021-08-27 19:12:04
Function layout
In our example, we will implement a pattern where a single Lambda function will handle a single grouping of URL endpoints. The initial set of endpoints that we will implement will be the following:
- List coffee cupping sessions: GET /session
- Create a coffee cupping session: POST /session
- Get coffee cupping session details: GET /session/{id}
- Delete a coffee cupping session: DELETE /session/{id}
Two unique URLs will map to two Lambda functions. These lambda functions will be responsible for inspecting the HTTP request passed in from API Gateway, determining what HTTP method is being called, and invoking the appropriate application code to fulfill the request:

Request routing for a /session endpoint. The application code will inspect the HTTP method and route to the appropriate application code for execution.
推薦閱讀
- Visual C# 2008開發技術實例詳解
- JMAG電機電磁仿真分析與實例解析
- MicroPython Projects
- 自動化控制工程設計
- 網絡組建與互聯
- 塊數據5.0:數據社會學的理論與方法
- 信息物理系統(CPS)測試與評價技術
- Learn CloudFormation
- 菜鳥起飛系統安裝與重裝
- 自動化生產線安裝與調試(三菱FX系列)(第二版)
- Working with Linux:Quick Hacks for the Command Line
- Mastering Geospatial Analysis with Python
- Excel 2007終極技巧金典
- Eclipse全程指南
- Mastering Machine Learning with R