PHPackages                             lukewaite/laravel-queue-aws-batch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. lukewaite/laravel-queue-aws-batch

ActiveLibrary[Queues &amp; Workers](/categories/queues)

lukewaite/laravel-queue-aws-batch
=================================

Laravel Queue for AWS Batch, enabling users to submit jobs for processing to a Batch queue.

v2.0.1(8y ago)922.3k17[2 PRs](https://github.com/lukewaite/laravel-queue-aws-batch/pulls)MITPHP

Since Apr 1Pushed 3y ago3 watchersCompare

[ Source](https://github.com/lukewaite/laravel-queue-aws-batch)[ Packagist](https://packagist.org/packages/lukewaite/laravel-queue-aws-batch)[ RSS](/packages/lukewaite-laravel-queue-aws-batch/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (7)Versions (15)Used By (0)

Laravel Queue for AWS Batch
---------------------------

[](#laravel-queue-for-aws-batch)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ce736587fcfa06e35d307549ce5adcf0f2664f250b2f8e5049f224eb5a36fb0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c756b6577616974652f6c61726176656c2d71756575652d6177732d62617463682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lukewaite/laravel-queue-aws-batch)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/6a67926004c4ebcfdac70acfd97d26a9053a939c1a7b87249229431951567a63/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c756b6577616974652f6c61726176656c2d71756575652d6177732d62617463682f54657374732f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/lukewaite/laravel-queue-aws-batch/actions/workflows/tests.yml?query=branch%3Amain++)[![Code Coverage](https://camo.githubusercontent.com/668019e0e04957c1894baa7800a12d734394e6eb9a4f75923cac354960d0c713/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c756b6577616974652f6c61726176656c2d71756575652d6177732d62617463682f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lukewaite/laravel-queue-aws-batch/?branch=main)

### Supported Versions

[](#supported-versions)

Laravel VersionPackage TagSupported8.xunreleasedyes5.4.x2.0.xno5.3.x1.0.xno5.2.x1.0.xno5.1.x1.0.xno### Installation

[](#installation)

See the table above for package version information, and change the version below accordingly.

Using `composer`, run:

```
composer require lukewaite/laravel-queue-aws-batch ~2.0

```

### Usage

[](#usage)

1. Your Laravel application will need to be dockerized and pushed into a container registry of your choice. The `ENTRYPOINT`should be set to `artisan`.
2. Add a new queue to your `config/queues.php` config file's `connections` array:

```
    [
        'batch' => [
            'driver' => 'batch',
            'table' => 'jobs',
            'queue' => 'first-run-job-queue',
            'jobDefinition' => 'my-job-definition',
            'expire' => 60,
            'region' => 'us-east-1'
        ]
    ]

```

This queue transport depends on being able to write it's queue jobs to a database queue. In this example, it writes it's jobs to the `jobs` table. You'll need to use the `artisan queue:table` to create a migration to create this table.

3. Create an AWS Batch job queue with the same name as the `queue` config setting. This is where the Batch connector will push your jobs into Batch. In this case, my queue name would be `first-run-job-queue`.
4. Create a AWS Batch job definition for each queue you define that looks something like this:

```
{
    "jobDefinitionName": "my-laravel-application",
    "type": "container",
    "parameters": {},
    "retryStrategy": {
        "attempts": 10
    },
    "containerProperties": {
        "image": "",
        "vcpus": 1,
        "memory": 256,
        "command": [
            "queue:work-batch",
            "Ref::jobId",
            "--tries=3"
        ],
        "volumes": [],
        "environment": [],
        "mountPoints": [],
        "ulimits": []
    }
}
```

Here, you configure your container to start, run the `queue:work-batch` command (assuming `artisan` is your entrypoint) and pass in the name of the queue, `first-run-job-queue` as well as the `Ref::jobId` param, which is passed in when the Batch connector creates the job.

It is important that you configure a retryStrategy with more "attempts" than you are running `tries` if you provide that argument. Otherwise, Batch will not retry your job if it fails. Laravel 5.1 does not write to the failed job queue until the *next* run after tries has been exceeded by jobs failing. Newer versions will write to the queue in the same run, so this requirement can be relaxed later.

6. Add the Service Provider to your application:
    - In `config/app.php` add to the `providers` array: `LukeWaite\LaravelQueueAwsBatch\BatchQueueServiceProvider::class`

### Limitations

[](#limitations)

#### Delayed Jobs

[](#delayed-jobs)

AWS Batch has no method to delay a job and as it's our runner, we don't have an easy work around. If you require delayed jobs for your use case, at this point my recommendation would be to use a regular DB queue, and to fire a job into it which will fire your batch job at the correct time.

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~121 days

Recently: every ~244 days

Total

13

Last Release

1826d ago

Major Versions

v0.2.1 → v1.0.02017-04-09

v1.0.0 → v2.0.02017-04-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/134ccfc3c0d62a251b2df558f57ac2ebc918d45bc95235acd2b60ba7f251bad1?d=identicon)[lukewaite](/maintainers/lukewaite)

---

Top Contributors

[![lukewaite](https://avatars.githubusercontent.com/u/618130?v=4)](https://github.com/lukewaite "lukewaite (64 commits)")

---

Tags

awsaws-batchlaravelphpqueuelaravelawsqueuebatch

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lukewaite-laravel-queue-aws-batch/health.svg)

```
[![Health](https://phpackages.com/badges/lukewaite-laravel-queue-aws-batch/health.svg)](https://phpackages.com/packages/lukewaite-laravel-queue-aws-batch)
```

###  Alternatives

[shiftonelabs/laravel-sqs-fifo-queue

Adds a Laravel queue driver for Amazon SQS FIFO queues.

1555.8M1](/packages/shiftonelabs-laravel-sqs-fifo-queue)[joblocal/laravel-sqs-sns-subscription-queue

A simple Laravel service provider which adds a new queue connector to handle SNS subscription queues.

48410.9k](/packages/joblocal-laravel-sqs-sns-subscription-queue)[dnxlabs/laravel-queue-aws-batch

Laravel Queue for AWS Batch, enabling users to submit jobs for processing to a Batch queue.

145.7k](/packages/dnxlabs-laravel-queue-aws-batch)[pod-point/laravel-aws-pubsub

A Laravel broadcasting driver and queue driver that broadcasts and listens to published events utilising AWS SNS, EventBridge and SQS.

1094.2k](/packages/pod-point-laravel-aws-pubsub)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
