使用 HTTP 端点调用进行 APIGateway 部署的无服务器框架?
Serverless framework for APIGateway deployment with HTTP endpoint invocation?
我正在尝试使用具有 http 端点调用的无服务器框架来实现 APIGateway 部署。
如何实现?
谢谢
终于找到答案了
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'"
我正在尝试使用具有 http 端点调用的无服务器框架来实现 APIGateway 部署。
如何实现?
谢谢
终于找到答案了
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'"