Skip to main content
Version: Next

S3 Bucket

The S3 Retriever v2 will use the aws-sdk-go-v2 to access your flag in an S3 bucket.

The S3 Retriever v1 will use the deprecated aws-sdk-go to access your flag in an S3 bucket.

AWS has announce end-of-support for AWS SDK for Go v1, and it's recommended to migrate from S3 Retriever v1 to v2.

Example

awsConfig, _ := config.LoadDefaultConfig(context.Background())
err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &s3retrieverv2.Retriever{
Bucket: "tpoi-test",
Item: "flag-config.goff.yaml",
AwsConfig: &awsConfig,
},
})
defer ffclient.Close()

Configuration fields

To configure your S3 file location:

FieldDescription
BucketThe name of your bucket.
ItemThe location of your file in the bucket.
AwsConfigAn instance of aws.Config that configure your access to AWS
check this documentation for more info.

Get the latest GO Feature Flag updates