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

Vapor Cli Laravel Package

laravel/vapor-cli

Laravel Vapor CLI is the command-line client for deploying and managing Laravel apps on Laravel Vapor, a serverless, auto-scaling platform on AWS Lambda. Create and manage infrastructure, environments, queues, databases, Redis, networking, and more.

View on GitHub
Deep Wiki
Context7

The CLI client for interacting with Laravel Vapor.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport