aws-go-s3
is a Amazon S3 utility library built with aws/aws-sdk-go-v2.
As of Feb 4, 2024, the master branch is work-in-progress for aws-sdk-go-v2
support. Please be aware of it.
Usage:
import "github.com/nabeken/aws-go-s3/v2"
v2 has the breaking changes noted below.
Paginator:
Bucket#BuildListObjectsV2PaginatorFactory
allows to build *s3.ListObjectsV2Paginator
through Bucket.ListObjectsV2PaginatorFactory
. Please refer to the test code for the details.
Presigned Request:
Bucket#PresignClient
allows to build a wrapper of *s3.PresignClient
. Please refer to the test code for the details.
If you want to use this library with aws-sdk-go
, please use v0 version of the library.
Usage:
import "github.com/nabeken/aws-go-s3"
You can run the test locally with Minio. Each test run will create a new bucket for clean testing.
Launch the minio:
docker run --rm -p 9000:9000 -p 9001:9001 -e MINIO_ROOT_USER=aws-go-s3 -e MINIO_ROOT_PASSWORD=aws-go-s3 minio/minio server /data --console-address ":9001"
then run the test:
cd bucket
export AWS_REGION=local
go test -v