Weave 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

Vapor Cli Laravel Package

laravel/vapor-cli

The official CLI client for Laravel Vapor, the auto-scaling serverless deployment platform for Laravel powered by AWS Lambda. Manage your infrastructure, queues, databases, Redis clusters, and CDN from the command line.

View on GitHub
Deep Wiki
Context7

Laravel Vapor CLI is the official command-line client for Laravel Vapor, an auto-scaling, serverless deployment platform for Laravel applications powered by AWS Lambda. It lets you manage your Laravel infrastructure on Vapor while abstracting away the complexity of configuring Lambda functions, SQS queues, databases, Redis clusters, networks, CloudFront CDN, and more.

  • Deploy and manage Laravel applications on AWS Lambda from the terminal
  • Provision and configure serverless infrastructure, including databases and caches
  • Interface with SQS queues, Redis clusters, and CloudFront CDN
  • Automate deployments and environment management in CI/CD workflows
  • Access official guidance via the Vapor documentation
Frequently asked questions about Vapor Cli
What Laravel versions does the `laravel/vapor-cli` package support?
The Vapor CLI is designed for Laravel 8.x through 10.x. Ensure your Laravel app is within this range before installation, as older versions may lack compatibility with Vapor’s serverless abstractions or AWS SDK dependencies.
How do I install and set up the Vapor CLI for my Laravel project?
Install via Composer with `composer require laravel/vapor-cli`. Then, authenticate by running `php artisan vapor:auth` and follow the prompts to link your AWS account. Ensure your AWS credentials have Vapor-specific IAM permissions for deployments.
Can I use the Vapor CLI to manage databases like DynamoDB or RDS?
Yes, the CLI supports provisioning and managing DynamoDB (serverless) and RDS (provisioned) databases. Use commands like `vapor:database:create` to set up resources, but note that schema migrations may require manual AWS Console adjustments for complex changes.
Does the Vapor CLI handle AWS Lambda cold starts, and how can I mitigate them?
The CLI abstracts Lambda deployments but doesn’t directly address cold starts. To mitigate, optimize your `composer.json` (remove unused dependencies), enable Provisioned Concurrency in the AWS Console, or use Vapor’s `vapor:function:update` to pre-warm functions.
How do I deploy a Laravel app to Vapor using the CLI?
Run `php artisan vapor:deploy` to push your app to Vapor. The CLI handles infrastructure provisioning, Lambda function updates, and environment configurations. Ensure your `vapor.yml` is properly configured for queues, databases, and networking before deployment.
Are there alternatives to Vapor CLI for serverless Laravel deployments?
For AWS Lambda, alternatives include Bref (Symfony-focused) or manual AWS SAM/CDK deployments. For non-AWS, consider Google Cloud Run or Azure Functions with custom tooling. Vapor CLI is unique for its Laravel-specific abstractions and tight Vapor integration.
Can I use the Vapor CLI with Laravel queues (e.g., SQS or database drivers)?
Yes, the CLI supports SQS queues and DynamoDB-based queues. Configure your queue connections in `.env` (e.g., `QUEUE_CONNECTION=sqs`), then use `vapor:queue:create` to provision SQS resources. For database queues, ensure your RDS/DynamoDB is properly set up.
How do I configure Redis (ElastiCache) with the Vapor CLI?
Use `php artisan vapor:redis:create` to provision an ElastiCache cluster. Update your Laravel config (`config/database.php`) to point to the generated Redis endpoint. The CLI handles VPC and security group configurations automatically during setup.
What AWS permissions are required for the Vapor CLI to work?
Your AWS IAM user/role needs permissions for Lambda, API Gateway, DynamoDB, RDS, ElastiCache, and CloudFront. Vapor provides a pre-configured IAM policy, but you may need to attach it manually if using custom roles. Test with `vapor:auth` to validate credentials.
How do I roll back a deployment if something goes wrong with the Vapor CLI?
Use `php artisan vapor:rollback` to revert to the previous deployment. Ensure your `vapor.yml` includes versioning for rollback support. For critical failures, manually revert Lambda functions via the AWS Console or use Vapor’s built-in rollback feature in the dashboard.
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.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager