Mab.PipelineFramework.FileStorage.AmazonS3
1.0.0
dotnet add package Mab.PipelineFramework.FileStorage.AmazonS3 --version 1.0.0
NuGet\Install-Package Mab.PipelineFramework.FileStorage.AmazonS3 -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mab.PipelineFramework.FileStorage.AmazonS3" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mab.PipelineFramework.FileStorage.AmazonS3" Version="1.0.0" />
<PackageReference Include="Mab.PipelineFramework.FileStorage.AmazonS3" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mab.PipelineFramework.FileStorage.AmazonS3 --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mab.PipelineFramework.FileStorage.AmazonS3, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mab.PipelineFramework.FileStorage.AmazonS3@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mab.PipelineFramework.FileStorage.AmazonS3&version=1.0.0
#tool nuget:?package=Mab.PipelineFramework.FileStorage.AmazonS3&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Mab.PipelineFramework.FileStorage.AmazonS3
AWS S3 implementation for IFileStore. Provides file storage operations using Amazon S3 buckets.
Installation
dotnet add package Mab.PipelineFramework.FileStorage.AmazonS3
Usage
using Amazon.S3;
using PipelineFramework.FileStorage;
using PipelineFramework.FileStorage.AmazonS3;
// Configure options
var options = new AwsStorageOptions
{
BucketName = "my-bucket",
BasePath = "uploads", // Optional prefix for all operations
AwsOptions = new AWSOptions
{
Region = RegionEndpoint.USEast1
}
};
// Create S3 client and file store
var s3Client = new AmazonS3Client(options.AwsOptions.Region);
var fileStore = new AwsFileStore(SystemClock.Instance, options, s3Client);
// Write a file
using var stream = new MemoryStream(Encoding.UTF8.GetBytes("Hello, S3!"));
await fileStore.CreateFileFromStreamAsync("documents/hello.txt", stream);
// Read a file
using var readStream = await fileStore.GetFileStreamAsync("documents/hello.txt");
using var reader = new StreamReader(readStream);
var content = await reader.ReadToEndAsync();
// List directory contents
await foreach (var entry in fileStore.GetDirectoryContentAsync("documents"))
{
Console.WriteLine($"{entry.Name} - {entry.Length} bytes");
}
// Copy and move files
await fileStore.CopyFileAsync("documents/hello.txt", "backup/hello.txt");
await fileStore.MoveFileAsync("documents/hello.txt", "archive/hello.txt");
// Delete files and directories
await fileStore.TryDeleteFileAsync("archive/hello.txt");
await fileStore.TryDeleteDirectoryAsync("backup");
Configuration Options
public class AwsStorageOptions
{
public string BucketName { get; set; } // Required: S3 bucket name
public string? BasePath { get; set; } // Optional: Prefix for all paths
public bool CreateBucket { get; set; } // Auto-create bucket if missing
public bool RemoveBucket { get; set; } // Remove bucket on cleanup
public AWSOptions? AwsOptions { get; set; } // AWS SDK configuration
}
Dependency Injection
services.AddSingleton<IClock>(SystemClock.Instance);
services.AddSingleton<IAmazonS3, AmazonS3Client>();
services.AddSingleton<IFileStore, AwsFileStore>();
services.Configure<AwsStorageOptions>(config.GetSection("S3Storage"));
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- AWSSDK.Extensions.NETCore.Setup (>= 3.7.300)
- AWSSDK.S3 (>= 3.7.400)
- Mab.PipelineFramework.FileStorage.Abstractions (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 188 | 11/28/2025 |