# Use Your Existing S3 Code

Tigris is fully S3-compatible. If you already have code that talks to AWS S3 or any S3-compatible service, you can switch to Tigris by changing two things:

1. **Endpoint** — point to `https://t3.storage.dev`
2. **Credentials** — use your Tigris access key and secret key

Everything else — your SDK calls, CLI scripts, libraries — stays exactly the same.

## Get your credentials[​](#get-your-credentials "Direct link to Get your credentials")

Create an access key in the [Tigris Console](https://console.storage.dev). You'll get a key pair:

* **Access Key ID** — starts with `tid_`
* **Secret Access Key** — starts with `tsec_`

Tigris authenticates using access key and secret key pairs only. AssumeRole, STS, and temporary security credentials are not supported. We recommend [rotating your access keys](/docs/iam/manage-access-key/.md) regularly.

## Configure your environment[​](#configure-your-environment "Direct link to Configure your environment")

The fastest way to get started is to set environment variables. Every AWS SDK and the AWS CLI will pick these up automatically:

```
export AWS_ACCESS_KEY_ID="tid_your_access_key"

export AWS_SECRET_ACCESS_KEY="tsec_your_secret_key"

export AWS_ENDPOINT_URL="https://t3.storage.dev"

export AWS_REGION="auto"
```

That's it. Your existing code now talks to Tigris.

### Using an AWS profile[​](#using-an-aws-profile "Direct link to Using an AWS profile")

If you use Tigris alongside AWS, add a named profile to `~/.aws/credentials` and `~/.aws/config`:

\~/.aws/credentials

```
[tigris]

aws_access_key_id = tid_your_access_key

aws_secret_access_key = tsec_your_secret_key
```

\~/.aws/config

```
[profile tigris]

endpoint_url = https://t3.storage.dev

region = auto
```

Then select the profile when running commands:

```
export AWS_PROFILE=tigris



# Or pass it per-command

aws s3 ls --profile tigris
```

## Quick examples[​](#quick-examples "Direct link to Quick examples")

* AWS CLI
* Python
* JavaScript
* Go
* Java

```
# List buckets

aws s3 ls --endpoint-url https://t3.storage.dev



# Create a bucket

aws s3 mb s3://my-bucket --endpoint-url https://t3.storage.dev



# Upload a file

aws s3 cp ./file.bin s3://my-bucket/ --endpoint-url https://t3.storage.dev



# Download a file

aws s3 cp s3://my-bucket/file.bin ./file.bin --endpoint-url https://t3.storage.dev
```

If you set `AWS_ENDPOINT_URL` in your environment, you can drop the `--endpoint-url` flag entirely.

```
import boto3

from botocore.client import Config



s3 = boto3.client(

    "s3",

    endpoint_url="https://t3.storage.dev",

    config=Config(s3={"addressing_style": "virtual"}),

)



# List buckets

for bucket in s3.list_buckets()["Buckets"]:

    print(bucket["Name"])



# Upload a file

s3.upload_file("./file.bin", "my-bucket", "file.bin")
```

```
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";



const s3 = new S3Client({

  region: "auto",

  endpoint: "https://t3.storage.dev",

});



const { Buckets } = await s3.send(new ListBucketsCommand({}));

console.log(Buckets.map((b) => b.Name));
```

```
cfg, _ := config.LoadDefaultConfig(ctx)



svc := s3.NewFromConfig(cfg, func(o *s3.Options) {

    o.BaseEndpoint = aws.String("https://t3.storage.dev")

    o.Region = "auto"

})



result, _ := svc.ListBuckets(ctx, &s3.ListBucketsInput{})

for _, b := range result.Buckets {

    fmt.Println(*b.Name)

}
```

```
S3Client s3 = S3Client.builder()

    .endpointOverride(URI.create("https://t3.storage.dev"))

    .region(Region.of("auto"))

    .build();



s3.listBuckets().buckets().forEach(b -> System.out.println(b.name()));
```

## AWS SDK guides[​](#aws-sdk-guides "Direct link to AWS SDK guides")

Tigris works with the official AWS SDKs for every language. Pick your language for full setup instructions, configuration options, and examples:

[![](/docs/img/icons/aws-cli.svg)![](/docs/img/icons/aws-cli-light.svg)](/docs/sdks/s3/aws-cli/.md)

[AWS CLI](/docs/sdks/s3/aws-cli/.md)

[![](/docs/img/icons/javascript.svg)![](/docs/img/icons/javascript-light.svg)](/docs/sdks/s3/aws-js-sdk/.md)

[JavaScript](/docs/sdks/s3/aws-js-sdk/.md)

[![](/docs/img/icons/golang.svg)![](/docs/img/icons/golang-light.svg)](/docs/sdks/s3/aws-go-sdk/.md)

[Go](/docs/sdks/s3/aws-go-sdk/.md)

[![](/docs/img/icons/java.svg)![](/docs/img/icons/java-light.svg)](/docs/sdks/s3/aws-java-sdk/.md)

[Java](/docs/sdks/s3/aws-java-sdk/.md)

[![](/docs/img/icons/python.svg)![](/docs/img/icons/python-light.svg)](/docs/sdks/s3/aws-python-sdk/.md)

[Python](/docs/sdks/s3/aws-python-sdk/.md)

[![](/docs/img/icons/php.svg)![](/docs/img/icons/php-light.svg)](/docs/sdks/s3/aws-php-sdk/.md)

[PHP](/docs/sdks/s3/aws-php-sdk/.md)

[![](/docs/img/icons/elixir.svg)![](/docs/img/icons/elixir-light.svg)](/docs/sdks/s3/aws-elixir-sdk/.md)

[Elixir](/docs/sdks/s3/aws-elixir-sdk/.md)

[![](/docs/img/icons/ruby.svg)![](/docs/img/icons/ruby-light.svg)](/docs/sdks/s3/aws-ruby-sdk/.md)

[Ruby](/docs/sdks/s3/aws-ruby-sdk/.md)

[![](/docs/img/icons/dotnet.svg)![](/docs/img/icons/dotnet-light.svg)](/docs/sdks/s3/aws-net-sdk/.md)

[.NET](/docs/sdks/s3/aws-net-sdk/.md)
