How to Access header in AWS Lambda?

前端 未结 2 2042
孤城傲影
孤城傲影 2021-02-09 23:47

I am using AWS Api Gateway. I have created resource and method using API Gateway.

I have created Lambda function for generating signed URL in json format to access s3 bu

2条回答
  •  再見小時候
    2021-02-10 00:10

    Api Gateway team checking in, Luc's answer is correct. Your Lambda function context has access to the request body only, so any headers that your clients send to Api Gateway will have to be mapped in the request template. The example that Luc gave is a good one, but also check out the reference doc:

    http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html

    Jack

提交回复
热议问题