接收lambda InvokeInput的lambda的方法签名是什么?

I'd like to get my two lambdas to communicate with each other. Lambda A uses InvokeInput, passing Payload as used in the example here:

https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/go/example_code/lambda/aws-go-sdk-lambda-example-run-function.go

However, the example doesn't show the receiving end i.e Lambda B. I'm trying to access Payload, so I've tried a handler with the method signatures:

func Handler(ctx context.Context, lambdaInput messages.InvokeRequest) (api.Response, error)

as well as

func Handler(ctx context.Context, lambdaInput lambda.InvokeInput) (api.Response, error)

When calling lambdaInput.Payload on the former it returns [] despite what's being sent as a payload.

I am unable to find the documentation on this, does anyone know the proper signature that I should be using?

From AWS docuentation:https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model-handler-types.html

The following lists valid handler signatures. TIn and TOut represent types compatible with the encoding/json standard library. For more information, see func Unmarshal to learn how these types are deserialized.

func ()
func () error
func (TIn), error
func () (TOut, error)
func (context.Context) error
func (context.Context, TIn) error
func (context.Context) (TOut, error)
func (context.Context, TIn) (TOut, error)

So it depends on what is in your payload. AWS will try to deserialize your data and match it with the TIn parameter in your function. There are already some types that represent AWS Event types, but in your case you should write your own struct. Check the link for some examples.