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

laravel/vapor-core

Core runtime and service providers for running Laravel apps on Laravel Vapor (AWS Lambda). Handles serverless bootstrapping and integrations with queues, databases, Redis, networking, CloudFront, and more for smooth, scalable deployments.

View on GitHub
Deep Wiki
Context7

Laravel Vapor Core / Runtime provides the core service providers and runtime client that make Laravel applications run smoothly on AWS Lambda via Laravel Vapor. It powers the serverless execution layer, handling the nuances of Lambda while keeping your app code focused on business logic.

Built for Vapor’s auto-scaling platform, it helps your Laravel app integrate cleanly with AWS services and Vapor-managed infrastructure.

  • Lambda-ready runtime for HTTP and CLI execution
  • Core service providers tailored for serverless environments
  • Smooth integration with SQS, databases, Redis, networks, and CloudFront
  • Designed for auto-scaling deployments with minimal operational overhead
  • Works alongside Vapor’s tooling and official documentation
Frequently asked questions about Vapor Core
How do I install `laravel/vapor-core` for a Laravel app on AWS Lambda?
Run `composer require laravel/vapor-core` in your Laravel project. The package integrates via service providers and requires no manual configuration unless you need custom `vapor.php` settings. Follow the [Vapor docs](https://docs.vapor.build) for deployment steps, including `vapor.yml` setup.
Does `vapor-core` support Laravel 13.x, or is it limited to older versions?
Yes, `vapor-core` is actively maintained for Laravel 11–13.x. Check the [Packagist page](https://packagist.org/packages/laravel/vapor-core) for the latest version, which aligns with Laravel’s LTS releases. Always test in a staging environment before production deployments.
Can I use Laravel Octane with `vapor-core` to reduce cold starts?
Absolutely. `vapor-core` supports Laravel Octane, which pre-warms containers and reduces cold starts to under 500ms p99. Enable it via `vapor.yml` or `config/vapor.php` and monitor performance with Vapor’s built-in metrics. Octane is ideal for latency-sensitive APIs.
How does `vapor-core` handle SQS queues and background jobs in serverless?
The package abstracts SQS integration behind Laravel’s queue system, so you use `dispatch()` or `queue()` as usual. Vapor auto-scales workers, and `vapor-core` handles event parsing (e.g., SQS triggers) without manual Lambda event mapping. For long-running jobs, set appropriate timeouts in `vapor.yml`.
Will my existing Laravel app break if I switch to `vapor-core` for AWS Lambda?
No, `vapor-core` is designed for minimal friction. It replaces PHP-FPM with a Lambda-optimized runtime while preserving Laravel’s ecosystem (Eloquent, Queues, etc.). Test stateful features (e.g., sessions) with Redis/ElastiCache, as file-based storage isn’t supported in serverless environments.
How do I debug issues in a Lambda function using `vapor-core`?
Use Vapor’s built-in X-Ray integration for distributed tracing and structured logging via `Vapor::log()`. For local testing, use `vapor test` or the AWS SAM CLI to simulate Lambda invocations. Check CloudWatch logs for runtime errors and monitor concurrency limits in AWS Console.
Is `vapor-core` locked into AWS, or can I migrate to another serverless provider?
`vapor-core` is AWS-specific, but you can abstract AWS logic (e.g., `Vapor::queue()`) behind interfaces for portability. For non-AWS providers like Bref, rewrite vendor-specific code or use adapters. Vendor lock-in is low for core Laravel logic but high for AWS-native features like Lambda@Edge.
How does `vapor-core` handle database connections in a serverless environment?
The package supports RDS Proxy and ElastiCache for connection pooling, mitigating cold-start latency. Configure your `.env` with `DB_CONNECTION=pgsql` (or MySQL) and ensure your RDS instance allows Lambda IAM roles. Avoid persistent connections; use connection pooling for high concurrency.
Can I use `vapor-core` for CLI commands or Artisan tasks in Lambda?
Yes, but with limitations. Vapor provides CLI handlers for Artisan commands, and you can use `vapor exec` for one-off tasks. For scheduled tasks, proxy cron jobs via AWS EventBridge or use Vapor’s scheduler. Test thoroughly, as Lambda’s ephemeral nature may require stateless designs.
What are the cost implications of using `vapor-core` with AWS Lambda?
Costs depend on execution time, memory, and concurrency. Monitor with AWS Cost Explorer and optimize by tuning memory/timeout settings in `vapor.yml`. Long-running jobs or unoptimized code can inflate costs; use Provisioned Concurrency for predictable workloads and SQS for async processing to avoid timeouts.
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