From 33593b75d49ff672fb492d53fe7d1461daef326c Mon Sep 17 00:00:00 2001 From: Nitav Shah Date: Wed, 10 Feb 2021 13:56:42 +0530 Subject: [PATCH] 'RequestId' to 'RequestID' in Golang Example In the Golang Lambda Handler for API Gateway, the RequestContext has no field as RequestId, so based on https://github.com/aws/aws-lambda-go/blob/v1.22.0/events/apigw.go#L32, field needs to be changed to 'RequestID' --- doc_source/services-apigateway-code.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_source/services-apigateway-code.md b/doc_source/services-apigateway-code.md index 85847284..40225f51 100644 --- a/doc_source/services-apigateway-code.md +++ b/doc_source/services-apigateway-code.md @@ -125,7 +125,7 @@ import ( ) func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { - fmt.Printf("Processing request data for request %s.\n", request.RequestContext.RequestId) + fmt.Printf("Processing request data for request %s.\n", request.RequestContext.RequestID) fmt.Printf("Body size = %d.\n", len(request.Body)) fmt.Println("Headers:") @@ -137,4 +137,4 @@ func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) ( } ``` -Build the executable with `go build` and create a deployment package\. For instructions, see [Deploy Go Lambda functions with \.zip file archives](golang-package.md)\. \ No newline at end of file +Build the executable with `go build` and create a deployment package\. For instructions, see [Deploy Go Lambda functions with \.zip file archives](golang-package.md)\.