Skip to content

Commit 33593b7

Browse files
authored
'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'
1 parent 4f29b53 commit 33593b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc_source/services-apigateway-code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ import (
125125
)
126126
127127
func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
128-
fmt.Printf("Processing request data for request %s.\n", request.RequestContext.RequestId)
128+
fmt.Printf("Processing request data for request %s.\n", request.RequestContext.RequestID)
129129
fmt.Printf("Body size = %d.\n", len(request.Body))
130130
131131
fmt.Println("Headers:")
@@ -137,4 +137,4 @@ func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (
137137
}
138138
```
139139

140-
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)\.
140+
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)\.

0 commit comments

Comments
 (0)