APIゲートウェイでは、「AWSサービス」インテグレーションタイプの生のHTTPリクエストを作成するためにAPIリファレンスに従わなければなりません。
an example for setting a different invocation parameter X-Amz-Invocation-Type
には、インテグレーションを作成するためのCLI呼び出しと派手な例が含まれています。
X-Amz-Log-Type
は、integration.request.header.X-Amz-Log-Type
というパラメータと同じ方法で設定されています。
{
"swagger": "2.0",
"info": {
"version": "2016-02-11T22:00:31Z",
"title": "LambdaAsync"
},
"host": "<placeholder>",
"basePath": "<placeholder>",
"schemes": [
"https"
],
"paths": {
"/": {
"get": {
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "200 response",
"schema": {
"$ref": "#/definitions/Empty"
}
}
},
"x-amazon-apigateway-integration": {
"passthroughBehavior": "when_no_match",
"httpMethod": "POST",
"uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:<account>:function:<function_name>/invocations?Qualifier=$LATEST",
"responses": {
"default": {
"statusCode": "200"
}
},
"requestParameters": {
"integration.request.header.X-Amz-Log-Type": "'tail'"
},
"type": "aws"
}
}
}
},
"definitions": {
"Empty": {
"type": "object",
"title": "Empty Schema"
}
}
}