|
I have deployed a lambda bwhind API Gateway using This works:
This does not work:
What I observe:
Does this sound familiar to someone here? The fact that the logs show the "correct" reponse tells me that the lambda either does not see or at least not act based on that header (indicator: the size). On the other hand I cannot imagine AWS having problems with |
Replies: 3 comments 1 reply
|
Hello, this should work. Are you using REST API endpoint? |
|
I specified the payload format version to be "1.0" instead of "2.0". I read about this parameter before but I would have expected it to explode with much more noise. Double checked: by switching back and forth between both settings, I get the behaviour described above. Bottom line: To deploy a Lambda handler using this crate, it can be deployed using code like this: resource "aws_apigatewayv2_api" "lambda" {
name = "some-gateway-name"
protocol_type = "HTTP"
}
resource "aws_apigatewayv2_stage" "lambda" {
api_id = aws_apigatewayv2_api.lambda.id
name = "v1"
auto_deploy = true
}
resource "aws_apigatewayv2_integration" "lambda_app" {
api_id = aws_apigatewayv2_api.lambda.id
integration_uri = aws_lambda_function.lambda_app.invoke_arn
integration_type = "AWS_PROXY"
integration_method = "POST"
payload_format_version = "2.0"
} |
|
Yeah, for HTTP Endpoint, only payload format version 2.0 is supported. |
I specified the payload format version to be "1.0" instead of "2.0". I read about this parameter before but I would have expected it to explode with much more noise.
Double checked: by switching back and forth between both settings, I get the behaviour described above.
Bottom line: To deploy a Lambda handler using this crate, it can be deployed using code like this: