async-aws/s3
AsyncAws S3 is a lightweight, async-friendly PHP client for Amazon S3. Install via Composer and interact with S3 using the AsyncAws ecosystem, with CI/BC checks and full docs available at async-aws.com.
async-aws/s3 package is part of the AsyncAws ecosystem, designed for non-blocking I/O using PHP’s async/await capabilities (via libraries like Amp or ReactPHP). This aligns well with Laravel’s growing support for async operations (e.g., Laravel 10+ with Symfony’s HttpClient or custom async workers).async-aws/s3 + laravel-horizon).Promise-like objects (via Amp\Promise or React\Promise) for non-blocking HTTP responses.async-aws/s3 depends on async-aws/core (shared across AsyncAws packages) and guzzlehttp/psr7. Laravel’s illuminate/http or symfony/http-client may need configuration to avoid conflicts.~/.aws/credentials, environment variables, IAM roles) via Aws\Credentials\Credentials or AsyncAws\Core\Credentials\Credentials.AsyncAws\Core\Exception\AsyncAwsException) must be caught and retried (e.g., using Laravel’s Illuminate\Support\Facades\Retry).AsyncAws\Core\MockClient) and testing concurrency scenarios.S3Client::putObject() return a Promise for async HTTP responses?config/aws.php, environment variables, or IAM roles)?Aws\S3\S3Client) be used as a fallback for non-async paths?monolog, OpenTelemetry)?Storage::disk('s3')) or replace it entirely?Symfony\Component\HttpClient or custom Amp/ReactPHP integrations.async-aws/s3 in a queue worker) for background S3 tasks.Amp\Loop, Amp\Promise).React\Promise).fruitcake/laravel-aws, evaluate whether to migrate to async-aws/s3 or use both (e.g., sync for legacy, async for new features).async-aws/s3.// Sync (current)
$s3 = new Aws\S3\S3Client([...]);
$s3->putObject([...]);
// Async (new)
$s3 = new AsyncAws\S3\S3Client([...]);
$promise = $s3->putObject([...]);
$promise->then(fn() => Log::info('Upload complete'));
UploadToS3Job) and dispatch via queues.UploadToS3Job::dispatch($filePath, $bucket)->onQueue('s3');
async-aws/s3 for new async features (e.g., checksums, multipart uploads) while keeping legacy sync calls for compatibility.Illuminate\Filesystem\FilesystemAdapter to use async-aws/s3 for async operations.async-aws/s3 directly in custom services (e.g., App\Services\AsyncS3Service).async-aws/s3 mirrors AWS SDK methods (e.g., putObject, listObjectsV2), so migration is straightforward.DateTimeImmutable → string for Expires in v3.0.0).Promise for async file uploads).async-aws/s3.async-aws/core and async-aws/s3 for AWS API changes (e.g., new regions, checksums).composer.json scripts or GitHub Actions.Expires type change).PutObjectAclRequest::setContentMD5).AsyncAws\Core\Exception\AsyncAwsException) must be logged and retried.try {
$result = $s3->putObject([...])->wait();
} catch (AsyncAwsException $e) {
Retry::until(fn() => $s3->putObject([...])->wait(), maxAttempts: 3);
}
AsyncAws\Core\MockClient for unit testing.$s3 = new S3Client([
'credentials' => [...],
'debug' => true, // Logs HTTP requests/responses
]);
How can I help you explore Laravel packages today?