rabbit-amazon-forwarder
rabbit-amazon-forwarder copied to clipboard
Lambda InvocationType
Hi,
Is it possible to add another (optional) parameter in the configuration, which is for Lambda InvocationType?
It is about this fragment of the code (/lambda/forwarder.go
):
// Push pushes message to forwarding infrastructure
func (f Forwarder) Push(message string) error {
if message == "" {
return errors.New(forwarder.EmptyMessageError)
}
params := &lambda.InvokeInput{
FunctionName: aws.String(f.function),
Payload: []byte(message),
InvocationType: aws.String("Event"),
}
resp, err := f.lambdaClient.Invoke(params)
Of course, instead of aws.String("Event")
there should be an option from the file /config/mapping.json
I think it would be a useful option
Regards