Questions tagged [amazon-sqs]

Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly scalable, hosted queue for storing messages as they travel between computers.

Resources

Tutorial

4134 questions
20
votes
4 answers

When to use delay queue feature of Amazon SQS?

I understand the concept of delay queue of Amazon SQS, but I wonder why it is useful. What's the usage of SQS delay queue? Thanks
elance
  • 203
  • 2
  • 4
20
votes
3 answers

Routing messages from Amazon SNS to SQS with filtering

In RabbitMQ, one can create an exchange, then bind it to multiple queues, each with a routing key. This enables messaging architectures like this: message_x / | \ foo-msg_q bar-msg_q msg-logger_q Clients publish…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
19
votes
9 answers

Best way to delete messages from SQS during development

During development, I'm generating a lot of bogus messages on my Amazon SQS. I was about to write a tiny app to delete all the messages (something I do frequently during development). Does anyone know of a tool to purge the queue?
Hairgami_Master
  • 5,429
  • 10
  • 45
  • 66
19
votes
4 answers

Is it possible to integrate AWS SNS and AWS SQS FIFO queue

With the introduction of FIFO queues in SQS we are guaranteed that SQS messages will be delivered in order. Now, could there be an out-of-order delivery when I publish messages through SNS? Here's what I'm thinking that could happen: _____ …
jlhonora
  • 10,179
  • 10
  • 46
  • 70
19
votes
2 answers

Shorthand syntax for message-attributes in the send-message command in aws-cli for sqs

When trying to send a message using AWS CLI for SQS, I cannot get the shorthand syntax for the --message-attributes parameter to work. Specifying a json file works fine, and the reference doesn't show an example for the shorthand option. Here is the…
alifib
  • 302
  • 1
  • 2
  • 7
19
votes
2 answers

AWS SQS permissions for AWS Lambda

I'm using the AWS SQS service, and I'm having a hard time defining permissions on my SQS queue. In my setup I'm using the AWS Lambda service, which is triggered when an object is pushed onto an S3 bucket. However to keep my question briefly, this…
18
votes
2 answers

Is there a GCP equivalent to AWS SQS?

Im curious to understand the implementation of GCP's PubSub. Although Pubsub seems to point to follow a Publish-Subscribe design pattern, it seems more close to AWS's SQS (queue) than AWS SNS (that use publish-subscribe model). Why is think this is,…
18
votes
4 answers

How to trace a request through an SQS queue with AWS X-Ray

I'm trying to get a toy example up and running with an AWS Lambda function, f, that's triggered by a message on one SQS queue, sqs, publishes to another queue sqs', and then a worker, f' reads from sqs' and processes the message where the entire…
Justin Bell
  • 800
  • 7
  • 20
18
votes
3 answers

Most effective way to poll an Amazon SQS queue using Node

My question is short, but I think is interesting: I've a queue from Amazon SQS service, and I'm polling the queue every second. When there's a message I process the message and after processing, go back to polling the queue. Is there a better way…
Laerion
  • 805
  • 2
  • 13
  • 18
17
votes
1 answer

Why is queue visibility timeout is recommended to be six times function timeout plus batch window?

From https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-queueconfig Set your queue visibility timeout to 6 times your function timeout, plus the value of MaximumBatchingWindowInSeconds Why can't the queue visibility timeout be…
psyud
  • 315
  • 2
  • 7
17
votes
1 answer

AWS SQS FIFO Queue: The queue should either have ContentBasedDeduplication enabled or MessageDeduplicationId provided explicitly?

When I try to add a message to my FIFO SQS using AWS CLI I get: An error occurred (InvalidParameterValue) when calling the SendMessage operation: The queue should either have ContentBasedDeduplication enabled or MessageDeduplicationId provided…
java12399900
  • 1,485
  • 7
  • 26
  • 56
17
votes
2 answers

How to configure this Spring-Boot app to use IAM Role instead of keys and secrets?

I have a Spring Boot app which communicates with S3 and SQS. It worked fine using AWS secret keys and secrets, but I found out I have a restriction in that I cannot use those credentials, but must instead authenticate using an IAM Instance…
jjones
  • 609
  • 2
  • 6
  • 10
17
votes
1 answer

SQS deleting automatically messages after receiving them by Lambda

I have an SQS that triggers a Lambda function. The Lambda function is just receiving the messsage and putting it in a DynamoDB. It works fine, but the problem is that i noted that the message is deleted from the SQS without the need to add delete()…
user1297406
  • 1,241
  • 1
  • 18
  • 36
17
votes
1 answer

AWS SQS Long Polling doesn't reduce empty receives

Currently, I have an AWS SQS as a trigger to my AWS Lambda function. I would like to implement long polling to reduce costs since I've used up 70% of my monthly free tier, mostly from empty receives. I tried setting up long polling by changing the…
naribo
  • 690
  • 8
  • 19
17
votes
1 answer

AWS Lambda SQS Trigger Throttle/Limit

I have an AWS SQS queue that I'm going to setup with a Lambda function trigger to run the Lambda function for every item that gets added to the queue to do some processing work. One step of processing is going to be hitting an API endpoint to get…
Charlie Fish
  • 18,491
  • 19
  • 86
  • 179