Registry /
cloud / aws-aws-sdk-go-v2-service-s3
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
s3
✓ github.com/aws/aws-sdk-go-v2/service/s3
List all S3 buckets using the AWS SDK v2.
package main
import (
"context"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
func main() {
cfg, _ := config.LoadDefaultConfig(context.TODO())
client := s3.NewFromConfig(cfg)
result, _ := client.ListBuckets(context.TODO(), &s3.ListBucketsInput{})
for _, bucket := range result.Buckets {
println(*bucket.Name)
}
}
Upgrade
Version history
1.103.3latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.