Api Gateway: AWS Subdomain for Lambda Integration

元气小坏坏 提交于 2019-12-06 02:27:05

So it's pretty annoying to set up, but here are two ways:

  1. Set up a regular Lambda integration and then add the InvocationType header described here http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html. The value should be 'Event'.

    • This is annoying because the console won't let you add headers when you have a Lambda function as the Integration type. You'll have to use the SDK or the CLI, or use Swagger where you can add the header easily.
  2. Set the whole thing up as an AWS integration in the console (this is what you're doing in the question), just so you can set the InvocationType header in the console

    • Leave subdomain blank
    • "Use path override" and set it to /2015-03-31/functions/<FunctionARN>/invocations where <FunctionARN> is the full ARN of your lambda function
    • HTTP method is POST
    • Add a static header X-Amz-Invocation-Type with value 'Event'

http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!