S3Append 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package S3Append --version 0.0.2
NuGet\Install-Package S3Append -Version 0.0.2
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="S3Append" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add S3Append --version 0.0.2
#r "nuget: S3Append, 0.0.2"
#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.
// Install S3Append as a Cake Addin
#addin nuget:?package=S3Append&version=0.0.2

// Install S3Append as a Cake Tool
#tool nuget:?package=S3Append&version=0.0.2

AWS .NET SDK S3 Append

Project license Pull Requests welcome Code with love by sezicz

About

S3 Append provides AppendObjectAsync extension method for .NET AWS SDK S3 client, capable of appending data to existing S3 hosted objects.

Implementation

Since AWS S3 is not a block storage system, content of hosted objects could not be altered in situ. That said, one would have to download, update and upload (override) the object again but such approach suffers of multiple problems (network throughput dependency, high memory requirements, etc.) that makes it practically unusable. For this reason, S3 Append implementation relies on AWS S3 multipart copy internally to avoid a need for data to be downloaded first:

Implications

Thanks to high degree of parallelism and almost unbounded network bandwidth, AWS S3 copy operations are lightning fast (compared to the naive download-update-upload approach). Moreover, internal AWS data transfers are free of charge, making the proposed solution a no brainer in situation where client logic resides outside of AWS cloud. Still, cost is the key aspect to be considered as (compared to the naive approach) at least five AWS S3 requests must be issued for every and each AppendObjectAsync method call (see Implementation for details).

Note that single UploadPartCopy operation could only copy up to 5 GiB of data. That said, append to an object with size of 5 TB would result in (at least) 1004 copy requests issued by S3 Append logic.

Usage

When imported into scope, AppendObjectAsync could be used in in a straightforward fashion. Consider S3 bucket 109a6d191b67 hosting object fa5ec9042bc3 with plain text content Hello. Following code would, when executed,

using Amazon.S3;
using S3Append.Extensions;
using S3Append.Models;
using System.Threading.Tasks;

public static async Task Main(string[] args)
{
	var client = new AmazonS3Client();
	var request = new AppendObjectRequest
	{
		BucketName = "109a6d191b67",
		Key = "fa5ec9042bc3",
		ContentBody = " world!"
	};

	await client.AppendObjectAsync(request);
}

result in (the same) fa5ec9042bc3 object containing proverbial Hello world!.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 471 3/10/2022
0.0.2 415 2/28/2022
0.0.1 397 2/25/2022

Public beta, please report back in case of problems