AWS SDK for .NET
The AWS SDK for NET
Before you start
- Create a service account.
- Add the service account to a group to grant it necessary permissions.
- Create a static access key.
Installation
To install the AWS SDK for.NET, follow the instructions
Setup
-
Go to the
~/.aws/
directory (for macOS and Linux) orC:\Users\<username>\.aws\
(for Windows). -
Create a file named
credentials
with authentication data for Object Storage and copy the following information to it:[default] aws_access_key_id = <static_key_ID> aws_secret_access_key = <secret_key>
-
Create a file named
config
with the default region parameters and copy the following information to it:[default] region=eu-north1
Note
Some apps designed to work with Amazon S3 don't let you set the region, so Object Storage also accepts the value
us-east-1
.
Specifics
- The AWS SDK for .NET incorrectly handles lifecycle configurations that contain no rule description (ID). Make sure to add a description to each lifecycle rule.
- To access Object Storage, for example, when working with the
AmazonS3Config
class, use thes3.ai.nebius.cloud
address.
Code samples
To connect to Object Storage, use this code:
AmazonS3Config configsS3 = new AmazonS3Config {
ServiceURL = "https://s3.ai.nebius.cloud"
};
AmazonS3Client s3client = new AmazonS3Client(configsS3);