Suppose that I have many millions of events in a 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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With