MCPcopy
hub / github.com/aws/aws-lambda-go / ExampleFromContext

Function ExampleFromContext

lambdacontext/example_test.go:11–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func ExampleFromContext() {
12 lambda.Start(func(ctx context.Context) (string, error) {
13 lc, _ := lambdacontext.FromContext(ctx)
14 log.Printf("Request ID: %s", lc.AwsRequestID)
15 log.Printf("Function ARN: %s", lc.InvokedFunctionArn)
16 return "success", nil
17 })
18}

Callers

nothing calls this directly

Calls 2

StartFunction · 0.92
FromContextFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…