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 Core Laravel Package

laravel/vapor-core

The core service providers and runtime client that power Laravel applications on AWS Lambda. Part of Laravel Vapor, the auto-scaling serverless deployment platform, handling integration with SQS queues, databases, Redis clusters, networks, and CloudFront CDN.

View on GitHub
Deep Wiki
Context7

Laravel Vapor Core provides the service providers and runtime client that let Laravel applications run smoothly on AWS Lambda. It powers Laravel Vapor, an auto-scaling, serverless deployment platform that abstracts away the complexity of managing Laravel infrastructure—queues, databases, Redis clusters, networks, and CloudFront CDN.

  • Serverless runtime tailored for AWS Lambda execution
  • Core service providers for seamless framework integration
  • SQS queue, database, and Redis cluster connectivity
  • Network and CloudFront CDN management
  • Lightweight integration with the Vapor CLI and deployment workflow

See the official documentation to get started.

Frequently asked questions about Vapor Core
What Laravel versions does laravel/vapor-core officially support?
The package is designed for Laravel 10 through 13. If you're using an older version (e.g., Laravel 9), you may need to manually patch dependencies like Symfony 8 components or check for community forks. Always verify compatibility with your Laravel version in the [Vapor docs](https://docs.vapor.build).
How do I install laravel/vapor-core in an existing Laravel project?
Run `composer require laravel/vapor-core` in your project root. The package auto-registers the `VaporServiceProvider` only when deployed to Vapor, so no manual configuration is needed for local development. Ensure your `config/app.php` includes the provider in the `providers` array if not auto-loaded.
Will laravel/vapor-core work with Laravel Octane (Swoole/RoadRunner) for real-time features?
Yes, but with caveats. Octane is supported in hybrid setups (tested in v2.37.8+), but Swoole/RoadRunner may conflict with Lambda’s event loop for HTTP traffic. Use Octane for WebSocket/real-time features while relying on Lambda for stateless API routes. Check the [Vapor docs](https://docs.vapor.build) for Octane-specific configurations.
How does laravel/vapor-core handle database connections in serverless environments?
The package addresses MySQL `wait_timeout` issues (fixed in v2.43.3+) and integrates with AWS RDS/ElastiCache via Laravel’s existing abstractions. For high concurrency, consider using RDS Proxy alongside Vapor’s connection pooling. Externalize sessions to Redis to avoid ephemeral storage limits (/tmp).
Can I use laravel/vapor-core with non-AWS storage like MinIO or DigitalOcean Spaces?
Yes, the package leverages Laravel’s Filesystem contracts, so any S3-compatible storage (e.g., MinIO, Backblaze B2) will work. Configure your `filesystems.php` to use the appropriate disk driver, and ensure your AWS SDK bindings support the target provider. Test uploads/downloads in a staging environment first.
How do I debug cold starts in Laravel Vapor using laravel/vapor-core?
Cold starts (~100–500ms) are inherent to Lambda but can be mitigated with provisioned concurrency. Use AWS X-Ray for distributed tracing or Vapor’s built-in logging to identify bottlenecks. Benchmark your app’s cold starts using the [AWS Lambda Power Tuning tool](https://github.com/alexcasalboni/aws-lambda-power-tuning) and compare against traditional servers.
Are there alternatives to laravel/vapor-core for deploying Laravel on AWS Lambda?
Other options include Bref (PHP runtime for Lambda) or custom Lambda layers for PHP, but they lack Laravel’s deep integration. Vapor-core is the official Laravel solution, offering seamless compatibility with Laravel’s ecosystem (Queues, Redis, Database) and AWS services. For multi-cloud, consider abstracting AWS-specific dependencies (e.g., SQS) using Laravel’s Queue interfaces.
How does laravel/vapor-core handle background jobs or queues in serverless?
The package resets scoped instances between Lambda invocations to prevent memory leaks in job queues. Use SQS for queue drivers (e.g., `queue:worker sqs`) and configure Vapor’s queue integrations in `config/queue.php`. For high-volume jobs, monitor SQS metrics in AWS CloudWatch to avoid cost overruns or throttling.
What are the production concerns when using laravel/vapor-core, like cost or security?
Serverless pricing (per invocation + duration) can escalate with inefficient code or traffic spikes. Set up AWS Cost Explorer alerts and use provisioned concurrency to reduce cold starts. For security, restrict Lambda execution roles to least privilege and enable AWS WAF for API Gateway endpoints. Use Vapor’s built-in HTTPS and CloudFront for encryption.
How do I test a Laravel app locally before deploying to Vapor with laravel/vapor-core?
Use the `VaporRuntime` class to simulate serverless environments locally: `app()->runningOnVapor()` will return `false` in local/dev, so test Lambda-specific logic (e.g., ephemeral storage, execution context) with custom assertions. Mock AWS services using tools like [LocalStack](https://localstack.cloud/) or Laravel’s `Mocker` trait for queues/databases.
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