--- title: "AWS SDK for C# With Wasabi" slug: "how-do-i-use-aws-sdk-for-c-with-wasabi" updated: 2026-07-29T20:13:32Z published: 2026-07-29T20:13:32Z canonical: "docs.wasabi.com/how-do-i-use-aws-sdk-for-c-with-wasabi" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt > Use this file to discover all available pages before exploring further. # AWS SDK for C# With Wasabi [AWS SDK for .NET](https://aws.amazon.com/sdk-for-net/) is a framework used for C# coding and is validated for use with Wasabi. This framework can be used with Wasabi by simply pointing the endpoint to a service URL that corresponds to a Wasabi region. To use the C#/.NET SDK with Wasabi, proceed with the following steps. *This was tested with AWS SDK version 4.* 1. Download [JetBrains Rider](https://www.jetbrains.com/rider/) IDE (you may use any IDE as per your requirements). In this example, we will be using NuGet packages. 2. Create a **project** in JetBrains. Navigate to **NuGet** to download and install the required AWS SDK packages. ![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Screenshot 2025-12-03 at 10.28.29 AM.png) 3. Type AWS in the search bar to see a list of all AWS SDKs. For our use case with Wasabi S3, install the following packages: ![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Screenshot 2025-11-27 at 2.37.24 PM.png) - AWSSDK.Core - AWSSDK.S3 4. Configure an additional [AWS CLI profile for Wasabi](https://docs.wasabi.com/docs/how-do-i-use-aws-cli-with-wasabi) account using the Wasabi keys. It is optional for you to use credential files to run your code; however it is always a best practice to use such an implementation wherein your credential keys are in a file stored on your local machine rather than part of your actual code. In this example, we set the profile name as "*wasabi*" in the "~/.aws/credentials" file. 5. Below is sample code to upload objects to Wasabi. > [!NOTE] > This example discusses the use of Wasabi's us-east-1 storage region. To use other Wasabi storage regions, use the appropriate Wasabi service URL as described in [Service URLs for Wasabi's Storage Regions](https://docs.wasabi.com/docs/what-are-the-service-urls-for-wasabi-s-different-storage-regions). > [!NOTE] > Wasabi currently does not support the value STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER for the X-Amz-Content-Sha256 header. As a result, we recommend disabling chunked transfer encoding in applications while uploading the object using the .NET SDK by setting UseChunkEncoding = false until support is available. > [!NOTE] > Be sure to use your own BucketName, Profile Name, and Client info/version (replace YourClientInfo/v1.2.3). ```csharp using Amazon.Runtime; using Amazon.Runtime.CredentialManagement; using Amazon.S3; using Amazon.S3.Model; namespace AWSWasabi {    public static class UploadWasabiObject    {        private static IAmazonS3 _s3Client = null!;        private const string BucketName = "mt-aws-sdk-test";        private const string ObjectName1 = "test.txt";        // Updated to take any object from the desktop, just adjust the file name above        private static readonly string PathToDesktop =            Environment.GetFolderPath(Environment.SpecialFolder.Desktop);        private static async Task Main()        {            // 1. Configure the S3-compatible endpoint (Wasabi) using the correct URL for your            // bucket's region and your client's info and version number            var config = new AmazonS3Config            {                ServiceURL = "https://s3.us-east-1.wasabisys.com",                ClientAppId = "YourClientInfo/v1.2.3"   // adds: app/YourClientInfo/v1.2.3 to                                                        // the User-Agent header            };            // 2. Load credentials from a named profile (replaces StoredProfileAWSCredentials)            var chain = new CredentialProfileStoreChain();            if (!chain.TryGetAWSCredentials("wasabi", out AWSCredentials awsCredentials))            {                Console.WriteLine("Could not find AWS profile 'wasabi'");                return;            }            // 3. Create S3 client with credentials and config            _s3Client = new AmazonS3Client(awsCredentials, config);            // The method expects the full path, including the file name.            var path = Path.Combine(PathToDesktop, ObjectName1);            await UploadObjectFromFileAsync(_s3Client, BucketName, ObjectName1, path);        }        private static async Task UploadObjectFromFileAsync(            IAmazonS3 client,            string bucketName,            string objectName,            string filePath)        {            try            {                var putRequest = new PutObjectRequest                {                    BucketName = bucketName,                    Key = objectName,                    FilePath = filePath,                    UseChunkEncoding = false                };                putRequest.Metadata.Add("x-amz-meta-title", "someTitle");                await client.PutObjectAsync(putRequest);                Console.WriteLine("Upload completed.");            }            catch (AmazonS3Exception e)            {                Console.WriteLine($"Error: {e.Message}");            }        }    } } ``` 6. Build and run your code in JetBrains. The exit code 0 indicates that everything ran successfully. ![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Screenshot 2025-12-03 at 11.04.47 AM.png) 7. You can now see the object in your bucket by logging into the [Wasabi Console](https://console.wasabisys.com). ![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Screenshot 2025-12-03 at 11.07.15 AM.png) 8. The following is an example of a download object script for this document. [](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Download(1).cs)Download2.38 KB[](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/Download(1).cs)