CloudBridge is a .NET 8 abstraction layer that provides a unified interface (IStorageClient) to interact with the main cloud storage providers:
- Amazon Web Services (AWS S3)
- Google Cloud Storage (GCS)
- Microsoft Azure Blob Storage
It enables you to upload, download, list, create, and delete buckets/objects without vendor lock-in by coding against a single interface.
Install the nuget package you need based on the provider(s) you want to use:
dotnet add package CloudBridge.AWS
dotnet add package CloudBridge.Google
dotnet add package CloudBridge.Azureusing Amazon.S3;
using CloudBridge.AWS;
// Configure S3 client
var config = new AmazonS3Config
{
ServiceURL = "http://localhost:4566", // LocalStack endpoint for local dev
ForcePathStyle = true
};
var s3 = new AmazonS3Client("test", "test", config);
// Wrap with CloudBridge
var client = new AwsStorageClient(s3);
// Example: list buckets
var buckets = await client.ListBucketsAsync();