[AWS DA] API Gateway: Mapping Templates
2023-09-14 09:00:46 时间
What does it means?
For example, if we have setup a API Gateway, REST API, GET method point to a Lambda function with no proxy intergration which return:
{ "statusCode": 200, "body": "\"Hello from Lambda! mapping\"" }
[Notice]: If we set with Proxy integration, we will only get the body from the response "Hello from Lambda! mapping"; Mapping template can NOT be used with proxy
If no proxy, then we get whatever Lambda function return to us.
Now we want to mask the response field to a different one:
In this case, we can use Mapping Templates.
To create a Mapping Template for a Method:
Here we renamed `statusCode` & `body`, and added new field `newField`.
相关文章
- AWS教你如何做威胁建模
- MySQL Error number: MY-011437; Symbol: ER_KEYRING_AWS_FAILED_TO_CONNECT_KMS; SQLSTATE: HY000 报错 故障修复 远程处理
- Amazon AWS云服务常见问题解答(AWS云架构师面试必备)架构师
- AWS省钱攻略:预留实例怎么玩
- AWS 宣布赞助 Rust 语言
- AWS 采用自制的 KVM 作为新的管理程序
- 亚马逊发布2018年财报:AWS为亚马逊贡献最多收入
- AWS Linux 登录指南:简单易懂的操作步骤(awslinux登录)
- 云服务器上MySQL的迁移AWS解决之道(aws mysql 迁移)
- 云上的挑战AWS与Oracle的对比(AWS 和oracle)
- AWS实现无缝迁移至Oracle(aws去oracle)
- 深入探索AWS与Oracle的强强合作(aws与oracle)
- AWS Oracle数据库备份确保数据安全保障(aws oracle备份)