async-aws/cloud-front
AsyncAws CloudFront Client is a lightweight PHP API client for AWS CloudFront. Install via Composer and use AsyncAws to create and manage CloudFront resources with typed requests and responses. Documentation and contribution guides available at async-aws.com.
Distribution, Invalidation, CachePolicy) maps cleanly to Laravel’s service layer or repository pattern, minimizing boilerplate for common CloudFront operations. This reduces cognitive load for developers unfamiliar with AWS SDK intricacies.config/aws.php or environment variables (AWS_ACCESS_KEY_ID), eliminating credential duplication. Can coexist with aws/sdk if configured separately.CloudFrontService::createDistribution()), enabling programmatic management tied to Laravel’s business logic.CacheInvalidated event after asset uploads).await syntax), which may clash with Laravel’s synchronous ecosystem. Developers unfamiliar with async PHP could introduce race conditions or deadlocks.CloudFrontInvalidationJob) to hide complexity.InvalidationInProgressException), which may not integrate smoothly with Laravel’s global exception handler. Poor handling could lead to cryptic user errors.DistributionNotFoundException to a NotFoundHttpException).AsyncAws\RetryMiddleware).vcr.php) to replay CloudFront API responses in CI.Queue::fake() in Pest).async-aws/s3).config/aws.php, or require a new async-aws.php config?aws/sdk and async-aws are used simultaneously.aws/sdk (v3) for critical operations.Spatie\CircuitBreaker) to halt retries after repeated failures.Log::channel('cloudfront') and integrate with tools like Datadog or Sentry.CloudFrontInvalidationJob). Ideal for most teams due to Laravel’s built-in queue workers and Horizon dashboard.CloudFront::invalidate()) using Spatie\Async to hide async complexity for simpler use cases.aws/sdk: Possible but requires separate credential configurations to avoid conflicts. Use AsyncAws\ClientBuilder with distinct profiles.config/aws.php for SDK, config/async-aws.php for AsyncAws).Origin settings match Laravel’s CORS rules.pest.php with AsyncAws\MockClient for async test doubles.php-vcr for deterministic tests.Phase 1: Proof of Concept (1–2 weeks)
aws cloudfront create-invalidation) with AsyncAws in a Laravel console command.composer require async-aws/cloud-front.php artisan cloudfront:invalidate) using AsyncAws’s async methods.Phase 2: Service Layer (2–3 weeks)
CloudFrontService facade to abstract AsyncAws.How can I help you explore Laravel packages today?