---
sidebar_position: 3
---

# S3 Bucket
The [**S3Retriever**](https://pkg.go.dev/github.com/thomaspoignant/go-feature-flag/retriever/s3retriever/#Retriever) will use the [aws-sdk](https://github.com/aws/aws-sdk-go) to access your flag in an S3 bucket.

## Example
```go linenums="1"
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:

| Field           | Description                                                                                                                                                                                    |
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **`Bucket`**    | The name of your bucket.                                                                                                                                                                       |
| **`Item`**      | The location of your file in the bucket.                                                                                                                                                       |
| **`AwsConfig`** | An instance of `aws.Config` that configure your access to AWS <br/>*check [this documentation for more info](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html)*. |
