rabbit-amazon-forwarder icon indicating copy to clipboard operation
rabbit-amazon-forwarder copied to clipboard

Lambda InvocationType

Open tomasz-kusy opened this issue 4 years ago • 0 comments

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

tomasz-kusy avatar Sep 05 '19 08:09 tomasz-kusy