How to delete events from an Amazon SQS

0 votes

Suppose that I have many millions of events in an SQS queue and I want to get rid of them quickly, but I cannot just delete the queue and make a new one.

What is the fastest way to delete/drain those events out of the queue?

Sep 21, 2018 in AWS by datageek
• 2,530 points

1 answer to this question.

0 votes

I'm assuming that you don't care about the values in the messages since you appear to want to drain it rather than process it. You can set the MessageRetentionPeriod to a very low value, and then drain any remaining messages out of the queue. After its drained, set the MessageRetentionPeriod back up to the desired value. You'll lose any messages that are older than the MessageRetentionPeriod.

answered Sep 21, 2018 by Archana
• 4,150 points

Related Questions In AWS

0 votes
1 answer

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Using AWS Management Console: Right-Click on the instance Instance ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,140 points
0 votes
1 answer

How to copy .csv file from Amazon S3 bucket?

Boto3 is the library to use for ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 58,140 points
0 votes
1 answer
+1 vote
2 answers

How to use jenkinsfile to get content from AWS SQS?

You can import standard AWS SDK to ...READ MORE

answered Jul 20, 2018 in AWS by Flying geek
• 3,260 points
+4 votes
5 answers

Usage of Amazon Cloudfront or S3

When to use S3? S3 is like many ...READ MORE

answered Apr 3, 2018 in AWS by brat_1
• 7,200 points
+3 votes
6 answers

Renaming files in S3

You can either use AWS CLI or ...READ MORE

answered Oct 16, 2018 in AWS by petter dj
0 votes
1 answer

S3 Static Website Hosting Route All Paths to Index.html

Yes there is an easy way to ...READ MORE

answered Apr 8, 2018 in AWS by code_ninja
• 6,290 points
0 votes
1 answer

Upload an image from Android to Amazon S3

Take a look at the Amazon S3 ...READ MORE

answered Sep 21, 2018 in AWS by Archana
• 4,150 points

edited Aug 8, 2019 by Archana 3,500 views
0 votes
1 answer

How to upload an object into Amazon S3 in Lambda?

I suspect you are calling the context.done() function before s3.upload() has ...READ MORE

answered Sep 27, 2018 in AWS by Archana
• 4,150 points