laravel/vapor-core
Core runtime and service providers for running Laravel on Vapor (AWS Lambda). Handles serverless bootstrapping and integrations like queues, databases, Redis, networking, and CDN, helping Laravel apps scale smoothly in a serverless environment.
Database, Redis, Queue). Reduces need for custom AWS SDK integrations.wait_timeout, FPM crashes, streamed responses) that break traditional Laravel deployments.VaporServiceProvider (skips on non-Vapor environments like Laravel Cloud).VaporRuntime for environment detection (e.g., app()->runningOnVapor()).AWS_LAMBDA_FUNCTION_NAME) for logging/metrics.aws/aws-sdk-php), avoiding redundant dependencies.Filesystem contracts.| Risk Area | Severity | Mitigation | Open Questions |
|---|---|---|---|
| Cold Start Latency | High | Vapor optimizes Lambda configs (provisioned concurrency), but PHP cold starts remain ~100–500ms. | How will we benchmark our app’s cold starts vs. traditional servers? |
| State Management | Medium | Ephemeral storage (e.g., /tmp) is limited (~512MB). Session/Redis must be externalized. |
Are we using external sessions (Redis) or file-based sessions (risk of data loss)? |
| Database Connections | Medium | MySQL wait_timeout issues fixed in v2.43.3, but RDS Proxy may still be needed for high concurrency. |
Will we use RDS Proxy or rely on Vapor’s connection pooling? |
| Vendor Lock-in | Low | AWS-specific, but Laravel abstractions (e.g., Queue, Database) allow partial portability. |
Could we abstract AWS dependencies (e.g., SQS) for multi-cloud? |
| Octane + Vapor Hybrid | Medium | Octane (Swoole/RoadRunner) may conflict with Lambda’s event loop. Tested in v2.37.8. | Will we use Octane for real-time features or stick to Lambda for all HTTP traffic? |
| Cost Overruns | High | Serverless pricing (per invocation + duration) can spiral with inefficient code or traffic spikes. | Do we have AWS Cost Explorer alerts for Lambda/SQS? |
| Debugging Complexity | High | Lambda’s distributed tracing (X-Ray) is required for observability. | Are we integrating AWS X-Ray or using Vapor’s built-in logging? |
| Legacy Code | Medium | Assumes Laravel 10–13. Older versions may need polyfills (e.g., Symfony 8 components). | What’s our Laravel version, and do we need to upgrade? |
| Custom Domains/CDN | Low | CloudFront integration is built-in, but custom domains require Route 53/ACM setup. | Will we use Vapor’s built-in CDN or manage CloudFront separately? |
Business Goals:
Architecture:
AWS Expertise:
Observability:
Cost Management:
Migration Strategy:
Team Skills:
Compliance/Security:
.env)?Primary Use Cases:
dispatch(new Job)).Compatibility Matrix:
| Laravel Component | Vapor Support | Notes |
|---|---|---|
| Routing | ✅ Full | API Gateway routes map to Laravel routes. |
| Queues | ✅ SQS/DynamoDB Streams | Uses Laravel’s Queue facade; Vapor adds SQS-specific optimizations. |
| Database | ✅ RDS/ElastiCache | MySQL wait_timeout fixes in v2.43.3; RDS Proxy recommended for high concurrency. |
| Caching | ✅ ElastiCache (Redis/Memcached) | Serverless ElastiCache supported since v2.35.0. |
| Storage | ✅ S3/S3-Compatible (MinIO) | v2.38.0 adds MinIO support. |
| Sessions | ⚠️ External Required | /tmp is ephemeral; use Redis or database sessions. |
| Filesystem | ✅ S3 | Laravel’s Storage facade works out-of-the-box. |
| ✅ SES | Uses Laravel’s Mail facade with SES integration. |
|
| Logging | ✅ CloudWatch | Vapor adds Lambda context to logs (e.g., AWS_LAMBDA_FUNCTION_NAME). |
| Octane | ✅ Partial | HTTP server works; WebSockets may require additional tuning (v2.37.8 fixes). |
| Horizon | ❌ Not Supported | Use SQS queues directly or third-party tools like Tighten’s Horizon for Vapor. |
AWS Services Integration: | Service | Integration Level | Notes
How can I help you explore Laravel packages today?