- Enter SQS dashboard and click on "Create Queue"
- As this will be the DLQ the name will be "original_dlq"
- Scroll down and enter the values given
- Message retention 14 days
- The rest remains as default
- Leave the rest by default and click on "Create Queue"
- Go back to SQS dashboard and click on "Create Queue" again
- This will be the queue subscribed to the SNS, so the name will be "original"
- Scroll down and enter the values given
- Default visibility timeout of 60 seconds
- Message retention of 6 hours
- Maximum message size of 48 KB
- Long polling of 20 seconds
- No delivery delay
- In Dead letter queue configuration add the previously created queue and 3 receives
- Click on "Create Queue"
- Go to the dlq created and click on "Edit"
- Scroll down to Redrive Allow Policy, enable and select the original queue as origin
- Click on "Save"
- Go to SNS Dashboard and click on "Topics"
- Click on "Create Topic"
- Set the type as "Standard" and the name
- Leave everything as default and click on "Create topic"
- Click on "Create subscription"
- Select "Amazon SQS" as protocol and the "original" queue as endpoint
- Click on "Create subscription"
- Go to SQS and edit "original" queue, then go to access policy and add permissions to the SNS topic to send messages
- Click on "Save"