Use the AWS SDK for Java V2 with Backblaze B2
    • Dark
      Light

    Use the AWS SDK for Java V2 with Backblaze B2

    • Dark
      Light

    Article Summary

    You can take advantage of Backblaze B2 Cloud Storage using the AWS SDK for Java V2 alongside the Backblaze S3-Compatible API.

    The following example shows an account with an S3 endpoint of s3.us-west-002.backblazeb2.com:

    Region region = Region.US_WEST_002;
    
    final String END_POINT = "https://s3.us-west-002.backblazeb2.com";
    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();

    The S3-Compatible API allows 1000’s of integrations to natively work with Backblaze B2. If you are new to the S3-Compatible API, click here. If you have issues using this SDK with Backblaze B2, let us know by emailing us at [email protected].


    Was this article helpful?