【发布时间】:2020-06-18 13:28:52
【问题描述】:
我正在尝试使用具有 http 端点调用的无服务器框架来实现 APIGateway 部署。
如何做到这一点?
谢谢
【问题讨论】:
标签: amazon-web-services deployment automation aws-api-gateway serverless-framework
我正在尝试使用具有 http 端点调用的无服务器框架来实现 APIGateway 部署。
如何做到这一点?
谢谢
【问题讨论】:
标签: amazon-web-services deployment automation aws-api-gateway serverless-framework
终于,我得到了解决方案。
functions:
TestAPI:
handler: handler.hello
events:
- http:
path: /test
method: get
authorizer: aws_iam
integration: http
cors: false
request:
uri: 'http://karthibalu.simplesite.com'
passThrough: NEVER
template:
application/json: '{}'
parameters:
headers:
X-Request-Id: false
response:
statusCodes:
200:
pattern: ''
headers:
Strict-Transport-Security: "'max-age=31536000'"
500:
pattern: '500'
headers:
Strict-Transport-Security: "'max-age=31536000'"
Access-Control-Allow-Origin: "'Original Url'"
【讨论】: