Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Flysystem Aws S3 V2

Flysystem Aws S3 V2 Laravel Package

league/flysystem-aws-s3-v2

Flysystem adapter for Amazon S3 built on AWS SDK v2. It lets PHP applications store, retrieve, and manage files on S3 through Flysystem’s consistent filesystem API, making it useful for legacy projects still tied to the v2 SDK. Ideal for maintaining older applications with a familiar Flysystem inter...

View on GitHub
Deep Wiki
Context7

Flysystem Adapter for AWS SDK V2

Frequently asked questions about Flysystem Aws S3 V2
How do I install league/flysystem-aws-s3-v2 in a Laravel app?
Install it with composer require league/flysystem-aws-s3-v2 only on a legacy stack, because it pins league/flysystem ~1.0 and aws/aws-sdk-php ~2.4. Laravel's native s3 driver resolves to the v3 adapter, so you must register this adapter through Storage::extend as a custom disk driver.
Does league/flysystem-aws-s3-v2 work with Laravel 9, 10, or 11?
No, assume it is incompatible with Laravel 9 and newer until proven otherwise, because those versions use Flysystem 3 and the v3 S3 adapter. This package is built for Flysystem 1.x and the legacy AWS SDK for PHP v2. Use it only in applications already frozen on those major versions.
How do I register a custom S3 v2 disk driver in Laravel?
In AppServiceProvider boot, call Storage::extend('s3v2', ...) and return a new Filesystem wrapping AwsS3Adapter with your S3Client, bucket, and optional prefix. Then set the disk driver in config/filesystems.php to s3v2. Keep all AwsS3Adapter and S3Client references inside that registration so the rest of the app only uses the Storage facade.
What PHP, Flysystem, and AWS SDK versions does this adapter require?
It requires league/flysystem ~1.0 and aws/aws-sdk-php ~2.4, which effectively constrains you to the PHP versions those legacy libraries support. Composer resolution will fail on modern Laravel or PHP 8 stacks that already require Flysystem 3 and AWS SDK v3. Verify the full lockfile in a clean branch before committing.
How do I configure credentials and region for the AWS SDK v2 S3 adapter?
The v2 SDK uses a flat client config with key, secret, and region values rather than the nested credentials array used in v3. You can also set base_url for a custom endpoint, and the v2 credential provider chain is more limited than modern IAM role assumption. Confirm your credential source works under the v2 SDK before relying on it in production.
Can I use a custom S3-compatible endpoint like MinIO with this adapter?
Yes, pass base_url in the S3Client configuration when pointing at MinIO, LocalStack, or another S3-compatible service. Check path-style versus virtual-hosted-style addressing and ACL behavior, because v2 configuration idioms differ from v3. Test uploads, listings, and deletes against the target endpoint before cutover.
What is the difference between flysystem-aws-s3-v2 and v3, and should I migrate?
The v3 adapter targets Flysystem 3 and AWS SDK v3 and is what Laravel's native s3 driver uses; this v2 package is archived and tied to Flysystem 1.x. Migration is a dependency and configuration change, not a data migration, because buckets, keys, and prefixes stay intact. Build a v3 spike against a non-production bucket, run dual-path validation, then cut over and remove the v2 adapter.
Is league/flysystem-aws-s3-v2 still maintained and safe for production?
It is archived, has roughly 50 stars and zero dependents, and receives no security patches or PHP compatibility fixes. The exposure includes end-of-life SDK signing and transport code, limited credential-chain support, and unvalidated behavior for multipart uploads and presigned URLs. Treat it as a time-boxed legacy bridge with an owned migration ticket and target date, not as a production-safe choice for new work.
How do I test S3 uploads and listings with this adapter in Laravel?
For unit tests, mock the S3Client or use Flysystem's in-memory adapter so you do not hit S3. For integration tests, use a dedicated non-production bucket or an S3-compatible service configured through base_url. Run dual-path validation against the v3 adapter before changing production configuration.
Does this adapter support multipart uploads, presigned URLs, and object metadata?
Basic operations such as put, get, delete, exists, list, stream, and metadata retrieval are supported through Flysystem's API. Multipart uploads and presigned URL behavior are not validated by upstream maintenance, so test those explicitly if they are in scope. Object versioning, cross-account access, and ACL semantics also need verification under the v2 SDK.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle