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

Function LambdaWrap

cfn/wrap.go:89–91  ·  view source on GitHub ↗

LambdaWrap returns a CustomResourceLambdaFunction which is something lambda.Start() will understand. The purpose of doing this is so that Response Handling boiler plate is taken away from the customer and it makes writing a Custom Resource simpler. func myLambda(ctx context.Context, event cfn.Even

(lambdaFunction CustomResourceFunction)

Source from the content-addressed store, hash-verified

87// lambda.Start(cfn.LambdaWrap(myLambda))
88// }
89func LambdaWrap(lambdaFunction CustomResourceFunction) (fn CustomResourceLambdaFunction) {
90 return lambdaWrapWithClient(lambdaFunction, http.DefaultClient)
91}
92
93// LambdaWrapSNS wraps a Lambda handler with support for SNS-based custom
94// resources. Usage and purpose otherwise same as LambdaWrap().

Callers 2

ExampleFunction · 0.92
LambdaWrapSNSFunction · 0.85

Calls 1

lambdaWrapWithClientFunction · 0.85

Tested by 1

ExampleFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…