07-15-2021 07:08 AM
I have received the below message from AWS SNS to my ultra pipeline, I would like to know how I can Decrypt / Decode the content from the message. Thanks
[
{
“task_name”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“client_port”: 19549,
“x-amz-sns-topic-arn”: “arn:aws:sns:xxxxxxxxxxxxxxxxxxxxx”,
“connection”: “keep-alive”,
“user-agent”: “Amazon Simple Notification Service Agent”,
“x-amz-sns-message-type”: “SubscriptionConfirmation”,
“x-forwarded-for”: “xxxxxxxxxxxx”,
“host”: “partners-fm.snaplogic.io”,
“content-length”: “1606”,
“x-amz-sns-message-id”: “7dabe4e2-e211-415f-8972-eaeeb3bad1d9”,
“content-type”: “text/plain; charset=UTF-8”,
“path_info”: “”,
“method”: “POST”,
“query”: {
},
“server_ip”: “xxx.xxx.xxx.xxx”,
“client_ip”: “xxx.xxx.xxx.xxx”,
“server_port”: 8084,
“uri”: “xxxxxxxxxxxxxxxx/Deepak%20Shaw/SNSTestUTask”,
“content”: “ewogICJUeXBlIiA6ICJTdWJzY3JpcHRpb25Db25maXJtYXRpb24iLAogICJNZXNzYWdlSWQiIDogIjdkYWJlNGUyLWUyMTEtNDE1Zi04OTcyLWVhZWViM2JhZDFkOSIsCiAgIlRva2VuIiA6ICIyMzM2NDEyZjM3ZmI2ODdmNWQ1MWU2ZTI0MjVlOTBjY2Y2MjMxNTYwOWNlODhhN2FlMGRmMmFkZjFlZDQ4ZmEwN2MzMThlMGJmYjcyYzczYjlkNTQyMWMwNmM2OGQ4NTM2YTYzMzQ3ODUzNzRiODVlOTFjMzY2NWFjMzJlYTRmZWNiYWEwM2VhNjJjYTEwMjkzOGIwNTUwZmZiOWEwODNhMmU0NzdmNjI1ZmJmOTc2NjcwMjk3ZDg4Mzk3NzdjNjBjMGE5M2RlOGQ2YWFmNjRlZWMxZmRkZTIwNTJiYTVhOWM0OGU0ZWVlM2E2ZjNlZjg5YTZlZTEzNDgyNDg1MGMxIiwKICAiVG9waWNBcm4iIDogImF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khMcmtqb2FuN0YrRzFmVFFKeDFRb0VyZXFvQjBsYmltTGg0a292emw0MUFpUWFKVzdhOXlXRFNvKzhaRkUzL1RZT2N0U1plWWdvd1VZMUZvcmFOa1A1VTMxTHRRb2ZMK2FXOTBNQkNFUnl2SDN1MXM3c2NDayt2d3oxb2pEWlNoRVFuSUhhSTdRYWNzL0NBRHl5QWUzTDJjbEhZdll2WVdSMWsvUG9WY2ZqTER0VmNEVndsc0lWZXFrOU5EZDRsekx3QU9LTWhGUEdrQk9lRm1xYmhnMld6dUNSdVVoK2pSVlc2R2JSTWpBNjhHa3Mxd0tyV1oxYjd0NVFHUGJIWms3OWZMbHpuWU9RTmFaWWJCTGhZaGpMc0kybmx1SGx2YmhReHZuNG5qMkFsZEhOd0JpRFVRPT0iLAogICJTaWduaW5nQ2VydFVSTCIgOiAiaHR0cHM6Ly9zbnMuYXAtc291dGhlYXN0LTIuYW1hem9uYXdzLmNvbS9TaW1wbGVOb3RpZmljYXRpb25TZXJ2aWNlLTAxMGE1MDdjMTgzMzYzNmNkOTRiZGI5OGJkOTMwODNhLnBlbSIKfQ==”
}
]
07-16-2021 01:19 AM
Hi @deepak.shaw
Please ensure that the path you are referring ($payload.content) exist in the input of the Snap where you have the Base64.decode function.
Try to use validation of the pipelines, so you will be able to check/preview the output of every Snap.
Regards,
Spiro Taleski
07-16-2021 07:01 AM
Thanks Spiro,
I’m getting below error:
Failure: Unable to decode base64 value, Reason: Bad Base64 input character decimal 123 in array position 0, Resolution: Make sure the argument is valid base64
Can you please suggest a fix?
07-16-2021 07:15 AM
What did you try to put as an argument to the base64.decode function?
You should pass base64 encoded value(string) to the function.
Regards,
Spiro Taleski