> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenbyte.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS SDK for Java V2 with Tenbyte T2

> How to use the AWS SDK for Java V2 with Tenbyte T2 S3-compatible storage

### How do I use the AWS SDK for Java V2 with Tenbyte T2?

You can take advantage of Tenbyte T2 Cloud Storage using the AWS SDK for Java V2 alongside the Tenbyte [S3-Compatible API](https://docs.tenbyte.io/docs/cloud/storage/s3-compitable-api/intro-s3-compitable-api).

The following example shows a configuration with the Tenbyte S3-compatible endpoint:

> **Note:** Make sure to replace `ACCESS_KEY` and `SECRET_ACCESS_KEY` with your actual Tenbyte T2 Access Key ID and Secret Access Key from your Tenbyte console.

```java theme={null}
import software.amazon.awssdk.auth.credentials.AwsSessionCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;

import java.net.URI;

public class TenbyteT2Example {

    public static void main(String[] args) {

        final String ACCESS_KEY = "<T2-keyId>";
        final String SECRET_ACCESS_KEY = "<T2-appKey>";
        final String END_POINT = "https://t2.tenbytecloud.com";

        Region region = Region.US_EAST_1;

        AwsSessionCredentials awsCreds = AwsSessionCredentials.create(
            ACCESS_KEY,
            SECRET_ACCESS_KEY,
            ""
        );

        S3Client s3 = S3Client.builder()
            .credentialsProvider(StaticCredentialsProvider.create(awsCreds))
            .endpointOverride(URI.create(END_POINT))
            .region(region)
            .build();

        // s3 client is now ready to use with Tenbyte T2
        System.out.println("Successfully connected to Tenbyte T2");
    }
}
```

The Tenbyte S3-Compatible API allows thousands of integrations to natively work with Tenbyte T2 Cloud Storage. If you are new to the Tenbyte S3-Compatible API, refer to the [Getting Started guide](https://docs.tenbyte.io/docs/cloud/storage/s3-compitable-api/intro-s3-compitable-api).

If you have issues using this SDK with Tenbyte T2, contact us at [support@tenbyte.io](mailto:support@tenbyte.io).
