PHPackages                             pin-cnx/laravel-aws-deploy - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. pin-cnx/laravel-aws-deploy

ActiveLaravel-package[DevOps &amp; Deployment](/categories/devops)

pin-cnx/laravel-aws-deploy
==========================

Deploy to auto scale without down time. By backup an master instance to AMI, create Launch configuration with those AMI, update it to auto scale, generate new instance, terminate the old instances.

1.0.8(5y ago)12801MITPHP

Since Apr 17Pushed 5y ago2 watchersCompare

[ Source](https://github.com/pin-cnx/laravel-aws-deploy)[ Packagist](https://packagist.org/packages/pin-cnx/laravel-aws-deploy)[ RSS](/packages/pin-cnx-laravel-aws-deploy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (10)Used By (0)

laravel-aws-deploy
==================

[](#laravel-aws-deploy)

The artisan command to deploy to aws EC2 auto scale without down time. This command will doing follow step.

1. Backup an master instance to AMI
2. Create Launch configuration with those AMI
3. Update it to auto scale
4. Generate new instance
5. Terminate the old instances.

Before use this plugin
----------------------

[](#before-use-this-plugin)

- You should have an master instance to generate into AMI (You have to provide an instance Id)
- Then you have to setup the auto scale in aws (You have to provide an auto scale name in config)
- The security group is need (Normally I get it from the master instance but just open the option for different group)

Install
-------

[](#install)

```
$ composer require pin-cnx/laravel-aws-deploy
```

Add this config to your services.php
------------------------------------

[](#add-this-config-to-your-servicesphp)

Modify services.php add following configuration. You can have many profiles, it will do them all in sequence(or just specify profile see in how to run the command)

```
'ec2' => [
        'key' => env('EC2_KEY'),
        'secret' => env('EC2_SECRET'),
        'region' => env('EC2_REGION', 'ap-southeast-1'),
        'profiles' => [
            'AnyName' => [
                // The value with *** need to change to your own aws component name
                'AMI_PREFIX' => 'AWSDEPLOY', // Prefix for the AMI just for easy to regconize ie. AWSDEPLOY'
                'InstanceId' => '***i-0123456789abcdef', //The master instance id to clone ie. i-0123456789abcdef
                'KeyName' => '***serverkey', // The pem key name to access to the auto scale's instances
                'AutoScalingGroupName' => '***my-auto-scale', // The auto scale group name,
                'SecurityGroups' => '***sg-123456', // The security group of instance ie. sg-123456
                'InstanceType' => env('EC2_SIZE','t3.nano') , // 'Instance type ie. t2.micro',
                'VolumeSize' => 30, //(Optional) Default:30 SSD size
                'region' => ['ap-southeast-1a','ap-southeast-1b'], // Region to spawn instances
                'NoReboot' => false, //(Optional) Default:false Is it will reboot the master instance to make AMI
                'IsTerminateCurrentInstance' => true, //(Optional) Default:true Is it will terminate the old instance which launch with old configuration.
                'IamInstanceProfile' => null, //(Optional) Default:null
                'AMI_TAGS' => [ // (Optional) What ever tag you need for the new instances
                    [
                        'Key' => 'stage',
                        'Value' => 'aws-deploy',
                    ],
                    [
                        'Key' => 'Project',
                        'Value' => 'aws-deploy',
                    ]
                ]
                , 'UserData' => "#!/bin/bash \n" . // (Optional)The first boot command to the instances
                    "#su - www-data -c \"php /var/www/html/artisan queue:restart\""
            ]
        ]
    ]
```

Run the command
---------------

[](#run-the-command)

Run all profiles

```
$ php artisan ec2backup
```

or just one profile

```
$ php artisan ec2backup --profile AnyName
```

Troubleshooting
---------------

[](#troubleshooting)

#### AWS HTTP error: SSL CA bundle not found

[](#aws-http-error-ssl-ca-bundle-not-found)

for some reason aws need to have ca-bundle.crt with curl lib to run. So copy the ca-bundle.crt from this git repository then put it to your project at /config/ca-bundle.crt

#### 401 Unauthorized

[](#401-unauthorized)

don't forgot to add env EC2\_KEY and EC2\_SECRET which has permission to access EC2

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

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 ~95 days

Recently: every ~190 days

Total

9

Last Release

2187d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/367ebdfd68ca59e906da604562d4b28c34700337d24b714ecf03960d88364e2d?d=identicon)[pin-cnx](/maintainers/pin-cnx)

---

Top Contributors

[![pin-cnx](https://avatars.githubusercontent.com/u/10082757?v=4)](https://github.com/pin-cnx "pin-cnx (25 commits)")

---

Tags

laravelawsdeploy

### Embed Badge

![Health badge](/badges/pin-cnx-laravel-aws-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/pin-cnx-laravel-aws-deploy/health.svg)](https://phpackages.com/packages/pin-cnx-laravel-aws-deploy)
```

###  Alternatives

[leroy-merlin-br/dployer

A simple script to deploy PHP applications to AWS ElasticBeanstalk

132.8k](/packages/leroy-merlin-br-dployer)

PHPackages © 2026

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