I am getting a signature in WebHook in a particualar header. I would like to pass the same to SQS either in Token Body or Attribute. I have tried following configuration. It is not working. Please help
Following are the details:
AWS Service : Simple Queue Service (SQS)
HTTP method :POST
Path override :Account/QueueName?Action=SendMessage
Execution role :arn:aws:iam::Acc#:role
Content Handling :Passthrough
Body Mapping Templates :
Content-Type : application/json
{
"MessageBody" : {
"payload": $input.json('$'),
"x-api-key" : "$input.params('x-api-key')"
}
}
Instead of MessageBody, I also tried with "body".
Response I get :
{
"Error": {
"Code": "MissingParameter",
"Message": "The request must contain the parameter MessageBody.",
"Type": "Sender"
},
"RequestId": "d5fc3acf-18dc-5379-9af2-6b4cc42358f3"
}
What am I missing? Please help. I have spent almost whole day trying to figure it out.
Thanks in Advance.