async-aws/simple-s3
AsyncAws Simple S3 is a lightweight wrapper around the AsyncAws S3 client that simplifies common S3 tasks and integrations. Install via Composer and use a higher-level API for working with buckets and objects without the boilerplate of raw S3 calls.
Install via composer require async-aws/simple-s3. After installation, instantiate the client—credentials load automatically from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION) or pass them explicitly. The first practical use is uploading content:
use AsyncAws\SimpleS3\SimpleS3Client;
$client = new SimpleS3Client();
$client->upload('my-bucket', 'documents/report.pdf', fopen('/path/report.pdf', 'r'));
Review the integration guide for configuration depth (e.g., custom endpoints, regional overrides).
upload(), download(), delete(), and has()—ideal for controllers, jobs, or console commands handling user uploads or backups.$url = $client->getPresignedUrl('my-bucket', 'uploads/avatar.png', '+20 minutes', $versionId: $versionId);
upload() in loops backed by AsyncAws\Core\Operation\ParallelExecutor for concurrent uploads without blocking the main thread—ideal for media processing pipelines.AppServiceProvider:
$this->app->singleton(\AsyncAws\SimpleS3\SimpleS3Client::class);
Then inject into services needing stateless, async S3 access without tight coupling to filesystem abstractions.S3Client via $client->getS3Client().versionId: If S3 versioning is enabled, always pass versionId in getPresignedUrl() or download()—otherwise, requests default to latest version, potentially causing stale data exposure.while ($retries++ < 3) { ... } catch (RuntimeException $e) { ... }).string|resource|\Traversable) and refined docblocks improve IDE support and static analysis—leverage PHPStan/Psalm rules for validation.S3Client for such needs to avoid fragile workarounds.SimpleS3Client mocks—no need for real buckets or filesystem fakes unless layering on Laravel’s Storage abstraction.How can I help you explore Laravel packages today?