Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Aws Deploy

Laravel Aws Deploy Laravel Package

pin-cnx/laravel-aws-deploy

Artisan command to deploy Laravel to AWS EC2 Auto Scaling with near zero downtime. Creates an AMI from a master instance, builds a new launch configuration, updates the ASG, spins up new instances, and can terminate old ones.

View on GitHub
Deep Wiki
Context7

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.

Frequently asked questions about Laravel Aws Deploy
How does this package ensure zero-downtime deployments for Laravel on AWS Auto Scaling?
The package creates an AMI from a master instance, updates the Auto Scaling Group (ASG) with a new launch configuration using that AMI, and spins up new instances before terminating old ones. This blue-green deployment approach minimizes downtime by ensuring traffic shifts only after new instances are fully operational.
What Laravel versions does `pin-cnx/laravel-aws-deploy` officially support?
The package was last updated in 2019 and hasn’t been tested with Laravel 10.x. While it may work with older versions (e.g., Laravel 5.x–8.x), you’ll need to manually verify compatibility, especially with AWS SDK v3 changes and Artisan command structure updates.
Do I need to set up AWS Auto Scaling before using this package?
Yes, you must pre-configure an Auto Scaling Group (ASG) with a Launch Template (not Launch Configuration, though the package uses the latter). The package assumes you’ve already set up IAM roles, security groups, and the ASG itself, which adds operational overhead for teams new to AWS.
Can this package handle Laravel database migrations during deployment?
No, the package doesn’t manage migrations. You’ll need to ensure migrations run *before* deployment (e.g., via a pre-deploy hook) or use a stateful database like Aurora with multi-AZ failover. Running migrations on old/new instances simultaneously risks conflicts.
What happens if the AMI creation fails during deployment?
The package lacks built-in rollback logic. If AMI creation fails, the Auto Scaling Group update may also fail, leaving your deployment in an inconsistent state. You’ll need to manually intervene or implement custom error handling (e.g., CloudWatch alerts or Laravel monitoring).
How do I configure multiple environments (e.g., staging, production) with different AWS setups?
Define profiles in `services.php` under the `ec2.profiles` key. Each profile can specify unique AWS resources (e.g., `InstanceId`, `AutoScalingGroupName`). Run the command with `--profile=production` to target a specific environment. Profiles are processed sequentially by default.
Will this package work with stateful Laravel services like Redis or session stores?
No, the package assumes stateless deployments. Terminating old instances post-deployment can disrupt stateful services (e.g., Redis sessions, in-memory caches). Use external storage (e.g., ElastiCache, S3-backed sessions) or coordinate manual syncs between old/new instances.
Are there alternatives to this package for Laravel AWS deployments?
Yes. For zero-downtime deployments, consider **Envoyer** (paid, Laravel-specific), **Deployer** (custom scripts), or **AWS CodeDeploy** (native AWS tool). These offer more modern features like rollback support, monitoring, and Laravel integration. This package is best for teams already using AWS Auto Scaling.
How do I handle security groups dynamically if they’re managed by Laravel Forge/Envoyer?
The package expects static security group IDs in the config. If using dynamic tools like Forge/Envoyer, you’ll need to manually sync group IDs or extend the package to fetch them via AWS API calls during deployment. Conflicts may arise if group rules change post-deployment.
What’s the cost impact of creating AMIs per deployment for frequent releases?
AWS charges for AMI storage and data transfer. Frequent deployments may increase costs, especially with large instance sizes or custom AMIs. Monitor your AWS bill and consider caching AMIs or using smaller instance types (e.g., `t3.nano`) to reduce overhead.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php