What is Laravel Vapor?
Laravel Vapor is a serverless deployment platform for Laravel applications that lets developers deploy, scale, and manage apps on AWS Lambda while controlling their own infrastructure. It abstracts server management but keeps AWS ownership in your hands.
How Laravel Vapor Works
Vapor allows Laravel apps to run on AWS Lambda using serverless architecture. It automates deployment, scaling, and resource management while integrating with AWS services such as S3, RDS, Redis, CloudFront, SQS, and Route53.
- Auto-scaling web, CLI, and queue Lambdas
- Environment variable and secret management
- Database provisioning with point-in-time restores
- Redis clusters with scaling and local tunnels
- Asset deployment to CloudFront CDN
- Zero-downtime deployments and rollbacks
- Custom application domains and SSL certificate management
- CI/CD integration via Vapor CLI
Modern Laravel Updates
- Docker & Native Runtime Support: Vapor now supports both Native and Docker-based Lambda runtimes. Docker is recommended for PHP 8.4+ apps with larger sizes (up to 10GB) or requiring advanced extensions like
imagickorpcntl. - No Horizon on Lambda: Laravel Horizon is incompatible with serverless Lambdas. Vapor uses SQS queues with Lambda concurrency and dashboard metrics instead.
- Separate Lambda Functions: Modern setups recommend distinct Web, CLI, and Queue Lambdas with custom memory and concurrency settings in
vapor.ymlto prevent queue jobs from affecting web performance.
Vapor Configuration (vapor.yml)
memory: 1024 # Web Lambda memory
queue-concurrency: 5 # Number of simultaneous queue jobs
cli-memory: 2048 # CLI Lambda memory for heavy Artisan tasks
This separation ensures stable performance for web requests and background jobs.
Vapor vs. Laravel Cloud
| Feature | Laravel Vapor | Laravel Cloud |
|---|---|---|
| Account | Uses your own AWS account | Fully managed by Laravel |
| Setup | High (IAM, VPC, RDS, NAT required) | Zero-config setup |
| Control | Full AWS Dashboard access | Streamlined Laravel dashboard |
| Best For | Enterprise or AWS-heavy teams | Fast-moving startups and zero-ops apps |
Installation & CLI
Install the Vapor CLI globally or per project:
composer global require laravel/vapor-cli --update-with-dependencies
# or per project
composer require laravel/vapor-cli --update-with-dependencies
Login to your account:
vapor login
Ensure your Laravel app has laravel/vapor-core installed:
composer require laravel/vapor-core --update-with-dependencies
Teams, Collaborators & AWS Link
- Vapor organizes resources into teams for collaborative projects.
- Invite and manage collaborators with granular permissions.
- Link your AWS account and create an IAM role for Vapor with AdministratorAccess or custom policies.
- Monitor AWS costs with Vapor-managed budgets and alerts.
Summary
Laravel Vapor is ideal for Laravel apps requiring serverless scalability while maintaining full AWS control. For startups or teams preferring zero-ops management, Laravel Cloud is the modern alternative. Vapor provides auto-scaling Lambdas, deployment automation, metrics, and full infrastructure control, making it suitable for enterprise-grade Laravel projects.
Related Answers
Still need help?
Talk to our Laravel experts
We've handled GDPR/CCPA compliance for dozens of EU & US Laravel.
