DEV Community

techdurjoy
techdurjoy

Posted on

Configure Your Laravel Queues with AWS SQS

Introduction
Recently, I had to migrate my queue driver on a project from Redis to SQS and for some weird reason the information provided on the official Laravel Queues documentation didn't do justice to this and I couldn't find an article online that could help, that's why I'm writing this, with the hope that you don't spend two hours of your Saturday morning figuring stuff that should have been documented. I'd try to keep this article as brief as possible, I'd attach links to other articles that explain some steps so I can focus on the important parts.

Prerequisites

An existing Laravel application
An AWS account
An understanding of Laravel queues
Some AWS knowledge

If you use Laravel Horizon to manage your queues, you'd be making some modifications to your horizon.php file. For each worker defined, change the queue connection from redis which is the default to env('QUEUE_CONNECTION')

Out of the box, Laravel dispatches jobs to the default queue, therefore, your first queue should be named default on SQS.

Configure Your Laravel Queues with AWS SQS

Top comments (0)