laravel/vapor-core
Core runtime and service providers that power Laravel Vapor deployments on AWS Lambda. Helps Laravel apps run smoothly in serverless environments, integrating with SQS, databases, Redis, networking, CloudFront, and other AWS services used by Vapor.
vapor-core is designed to abstract AWS Lambda complexities for Laravel, making it a natural fit for teams already using or evaluating Laravel Vapor as their serverless deployment platform. The package handles:
wait_timeout resets, critical for serverless environments with ephemeral connections.| Risk Area | Severity | Mitigation |
|---|---|---|
| Symfony 8 Dependency | High | Requires Laravel 13+. Test thoroughly if using Symfony components directly. |
| AWS Lock-in | Medium | Abstract AWS-specific logic if multi-cloud is a future goal. |
| Cold Start Overhead | Medium | Optimize Lambda memory/timeout settings; leverage Vapor’s provisioned concurrency. |
| Stateful Session Issues | Medium | Use ElastiCache (Redis) for session storage; avoid file-based sessions. |
| Multipart Request Parsing | Low | Fixed in v2.37.9; verify with complex payloads (e.g., file uploads). |
| Laravel Version Drift | Low | Package supports Laravel 10–13; pin version to avoid surprises. |
HttpClient, Cache)? If yes, this package ensures consistency.VaporServiceProvider.| Phase | Action Items | Dependencies |
|---|---|---|
| Assessment | Audit app for stateful operations, Symfony dependencies, and AWS usage. | DevOps, Backend |
| Proof of Concept | Deploy a non-critical Laravel service to Vapor to test cold starts, costs. | AWS Account, CI/CD |
| Refactoring | - Replace file storage with S3. | Storage Team |
| - Migrate sessions to Redis. | Cache Team | |
| - Convert queue workers to serverless-compatible (e.g., SQS triggers). | Queue Team | |
| Integration | - Install vapor-core and vapor-cli. |
Backend |
- Configure VaporServiceProvider in config/app.php. |
Backend | |
| - Set up Lambda layers for shared dependencies (e.g., AWS SDK). | DevOps | |
| Testing | - Test cold starts, concurrency, and error handling. | QA |
| - Validate API Gateway integrations (e.g., custom domains, caching). | Frontend | |
| Deployment | - Roll out to staging with canary releases. | DevOps |
| - Monitor costs (AWS Lambda pricing) and performance (latency). | Observability Team |
HttpClient, Cache).vapor-core to composer.json:
composer require laravel/vapor-core
VaporServiceProvider in config/app.php:
'providers' => [
// ...
Laravel\Vapor\Core\VaporServiceProvider::class,
],
VAPOR_ENV in .env (non-standard environments).vapor.yml for AWS resources (e.g., memory, timeout).vapor-cli.vapor-core follows Laravel’s release cadence. Plan for quarterly updates to align with Laravel/Symfony.How can I help you explore Laravel packages today?