Skip to main content
Best answer

Amazon SQS Create Message fails with unhelpful "Unable to publish message to queue" error

  • November 7, 2024
  • 8 replies
  • 48 views

Forum|alt.badge.img

If anyone has any ideas on what to try to solve this, I’d really appreciate it.  I feel like I’ve done all of the permutations possible.

I’m trying to use the Amazon SQS Create Message task as shown below.  However, every time I test it or it executes in a Zap run, I get the same error message: Unable to publish message to queue.  There’s no other error information provided.

I’ve confirmed that the actual values work with the AWS CLI SDK.  user1 referenced is the same access and secret key as my AWS connection in Zapier, and the same region: us-west-2.

aws sqs send-message --queue-url https://sqs.us-west-2.amazonaws.com/#############/myqueuesnamegoeshere.fifo --message-body "my message" --message-deduplication-id "123456" --message-group-id "MyGroupName" --profile user1

No logs get created in the Zapier history, all I see is this.

 

Yes, I’ve read this post, but there was no resolution and it’s a different error.

 

Thanks,

Eric

Best answer by Anything-Helps.org

RESOLUTION: I ended up creating a Platform CLI integration that uses the AWS SDK for Node.js.  It works great, zero problems, exactly like the AWS CLI does.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/SendMessageCommand/

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30727 replies
  • November 7, 2024

Hi @Anything-Helps.org 

Help links for using Amazon SQS in Zaps: https://help.zapier.com/hc/en-us/articles/8495989136013-How-to-Get-Started-With-Amazon-SQS

 

For the Queue Name field, try clicking the [...] button to switch to “Static” mode, then pick an option from the dropdown list.

 


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30727 replies
  • November 7, 2024

@Anything-Helps.org 

Feedback from ChatGPT:

 

The error "Unable to publish message to queue" in your Zapier step for Amazon SQS can have several potential causes. Here are some common issues to check:

1. **Queue Name Format**: Ensure that the queue name you entered (e.g., `myqueuesnamegoeshere.fifo`) exactly matches the name of the FIFO queue in Amazon SQS. FIFO queues must end with `.fifo`, and any typo could lead to this error.

2. **Queue URL**: In the "QueueUrl" field, make sure the URL matches the specific queue you’re targeting, including the correct AWS region. Double-check for any typos or missing characters in the URL.

3. **MessageDeduplicationId and MessageGroupId**: For FIFO queues, the `MessageDeduplicationId` and `MessageGroupId` fields are required:
   - **MessageDeduplicationId**: It should be unique for each message unless you intend to deduplicate similar messages. If omitted, SQS can generate it automatically if Content-Based Deduplication is enabled on the queue.
   - **MessageGroupId**: This is required for all messages in FIFO queues and helps in grouping related messages. Ensure it is non-empty.

4. **Permissions**: Ensure the IAM role or user that Zapier is using has permission to send messages to this specific SQS queue.

5. **MessageBody**: Verify that the `MessageBody` field contains a valid string (it seems correct in your screenshot, but it’s good to double-check).

6. **Encoding**: Make sure the encoding (currently set to "Raw") matches what SQS expects, though typically "Raw" should work for most standard JSON payloads.

If everything looks correct, try testing the step again or reviewing the Amazon SQS error logs for more specific details on why the message couldn’t be published. Let me know if you need further assistance!


Forum|alt.badge.img
Troy Tessalone wrote:

Hi @Anything-Helps.org 

Help links for using Amazon SQS in Zaps: https://help.zapier.com/hc/en-us/articles/8495989136013-How-to-Get-Started-With-Amazon-SQS

 

For the Queue Name field, try clicking the [...] button to switch to “Static” mode, then pick an option from the dropdown list.

 

I do use the static option to select my one and only queue.  For the screen shot, I used custom to display a fake name as I’m not sure how much I should protect my queue name and account number.


Forum|alt.badge.img
Troy Tessalone wrote:

@Anything-Helps.org

Feedback from ChatGPT:

...

6. **Encoding**: Make sure the encoding (currently set to "Raw") matches what SQS expects, though typically "Raw" should work for most standard JSON payloads.

If everything looks correct, try testing the step again or reviewing the Amazon SQS error logs for more specific details on why the message couldn’t be published. Let me know if you need further assistance!

I am able to submit the EXACT data from Zapier via the AWS CLI SDK, so I know all the data in the content is acceptable.

I’ve tried both Base64 and Raw encoding with the same results.

I have no idea where the SQS error logs are.  I’ve looked in SQS and CloudWatch via the AWS Console.  I’ll research that a bit more, but it’s stupid that Zapier has no logs for this error.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30727 replies
  • November 7, 2024

@Anything-Helps.org 

Have you tried this…

For the Content field, simply including the Message Body value: my message

Meaning NO JSON.

 

You may want to try opening a ticket with Zapier Support for more help: https://zapier.com/app/get-help


Forum|alt.badge.img
Troy Tessalone wrote:

@Anything-Helps.org

Have you tried this…

For the Content field, simply including the Message Body value: my message

Meaning NO JSON.

...

You may want to try opening a ticket with Zapier Support for more help: https://zapier.com/app/get-help

I just tried, same no info error.

I have created a support ticket, specifically asking them to tell me what their missing logs say about this error.


Forum|alt.badge.img

RESOLUTION: I ended up creating a Platform CLI integration that uses the AWS SDK for Node.js.  It works great, zero problems, exactly like the AWS CLI does.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/command/SendMessageCommand/


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • 2188 replies
  • November 13, 2024

hi @Anything-Helps.org,

 

Thank you for sharing the resolution to this issue. It will significantly help our Community members who are having the same problem.