Skip to main content

Credentials

To use Object Storage you need Access Key, Secret Key, and Endpoint URL.

Get Credentials

In the dashboard of the Object Storage, you can see the Access key and Secret Key related to your user account.

For authentication, you can put Access Key and Secret Key in the following code snippet.

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX - License - Identifier: Apache - 2.0

using Amazon.S3;
using Amazon.S3.Model;
using System;
using System.Threading.Tasks;

namespace CreateBucket
{
public class CreateBucket
{
// This example shows how to use Amazon Simple Storage Service (Amazon S3)
// to create a new Amazon S3 bucket. The examples uses AWS SDK for .NET 3.5 and
// .NET 5.0.

private static IAmazonS3 _s3Client;

static async Task Main()
{
var awsCredentials = new Amazon.Runtime.BasicAWSCredentials("<ACCESS-KEY>", "<SECRET-KEY>");
var config = new AmazonS3Config { ServiceURL = "<ENDPOINT>" };
_s3Client = new AmazonS3Client(awsCredentials, config);

// Continue your code here
}
}
}