diff --git a/events/apigw.go b/events/apigw.go index 47c4db4e..04ac73f6 100644 --- a/events/apigw.go +++ b/events/apigw.go @@ -30,22 +30,23 @@ type APIGatewayProxyResponse struct { // APIGatewayProxyRequestContext contains the information to identify the AWS account and resources invoking the // Lambda function. It also includes Cognito identity information for the caller. type APIGatewayProxyRequestContext struct { - AccountID string `json:"accountId"` - ResourceID string `json:"resourceId"` - OperationName string `json:"operationName,omitempty"` - Stage string `json:"stage"` - DomainName string `json:"domainName"` - DomainPrefix string `json:"domainPrefix"` - RequestID string `json:"requestId"` - Protocol string `json:"protocol"` - Identity APIGatewayRequestIdentity `json:"identity"` - ResourcePath string `json:"resourcePath"` - Path string `json:"path"` - Authorizer map[string]interface{} `json:"authorizer"` - HTTPMethod string `json:"httpMethod"` - RequestTime string `json:"requestTime"` - RequestTimeEpoch int64 `json:"requestTimeEpoch"` - APIID string `json:"apiId"` // The API Gateway rest API Id + AccountID string `json:"accountId"` + ResourceID string `json:"resourceId"` + OperationName string `json:"operationName,omitempty"` + Stage string `json:"stage"` + DomainName string `json:"domainName"` + DomainPrefix string `json:"domainPrefix"` + RequestID string `json:"requestId"` + ExtendedRequestID string `json:"extendedRequestId"` + Protocol string `json:"protocol"` + Identity APIGatewayRequestIdentity `json:"identity"` + ResourcePath string `json:"resourcePath"` + Path string `json:"path"` + Authorizer map[string]interface{} `json:"authorizer"` + HTTPMethod string `json:"httpMethod"` + RequestTime string `json:"requestTime"` + RequestTimeEpoch int64 `json:"requestTimeEpoch"` + APIID string `json:"apiId"` // The API Gateway rest API Id } // APIGatewayV2HTTPRequest contains data coming from the new HTTP API Gateway diff --git a/events/testdata/apigw-request.json b/events/testdata/apigw-request.json index 63910bfe..f58316e9 100644 --- a/events/testdata/apigw-request.json +++ b/events/testdata/apigw-request.json @@ -64,6 +64,7 @@ "domainName": "gy415nuibc.execute-api.us-east-2.amazonaws.com", "domainPrefix": "y0ne18dixk", "requestId": "deef4878-7910-11e6-8f14-25afc3e9ae33", + "extendedRequestId": "TWegAcC4EowCHnA=", "protocol": "HTTP/1.1", "identity": { "cognitoIdentityPoolId": "theCognitoIdentityPoolId", diff --git a/events/testdata/apigw-restapi-openapi-request.json b/events/testdata/apigw-restapi-openapi-request.json index 5af5a471..72b3ed3b 100644 --- a/events/testdata/apigw-restapi-openapi-request.json +++ b/events/testdata/apigw-restapi-openapi-request.json @@ -65,6 +65,7 @@ "domainName": "gy415nuibc.execute-api.us-east-2.amazonaws.com", "domainPrefix": "y0ne18dixk", "requestId": "deef4878-7910-11e6-8f14-25afc3e9ae33", + "extendedRequestId": "TWegAcC4EowCHnA=", "protocol": "HTTP/1.1", "identity": { "cognitoIdentityPoolId": "theCognitoIdentityPoolId",