![]() |
VOOZH | about |
dotnet add package S3Server --version 6.0.26
NuGet\Install-Package S3Server -Version 6.0.26
<PackageReference Include="S3Server" Version="6.0.26" />
<PackageVersion Include="S3Server" Version="6.0.26" />Directory.Packages.props
<PackageReference Include="S3Server" />Project file
paket add S3Server --version 6.0.26
#r "nuget: S3Server, 6.0.26"
#:package S3Server@6.0.26
#addin nuget:?package=S3Server&version=6.0.26Install as a Cake Addin
#tool nuget:?package=S3Server&version=6.0.26Install as a Cake Tool
Simple S3 server-side interface, produced using Amazon's public documentation. Want a simple S3 storage server built using S3Server? Check out Less3.
Is there an API you'd like exposed that isn't currently? Did you identify an issue or have other feedback? Please file an issue here!
new byte[0] to Array.Empty<byte>()ObjectWrite (e.g. PutObject), returns EntityTooLarge if exceededRefer to Test.Client and Test.Server projects for full examples.
The following notes should be read prior to using S3Server:
Path-style URLs are default, i.e. http://hostname.com/bucket/key
Virtual hosting URLs can be used by setting S3Server.ServiceCallbacks.FindMatchingBaseDomain
* or +) and run under administrative privilegesKeyNotFoundExceptionhosts file to resolve these names accordingly[host].local.gd or [host].fbi.com)Refer to the Test.Server project for a more complete example.
using S3ServerLibrary;
using S3ServerLibrary.S3Objects;
// Initialize the server
S3Server server = new S3Server("[hostname]", 8000, false, DefaultRequestHandler); // host, port, SSL
// Set callbacks
server.Service.ListBuckets = ListBuckets;
server.Bucket.Exists = BucketExists;
// etc
// Start the server
server.Start();
// Example callback definition
static async Task DefaultRequestHandler(S3Context ctx)
{
ctx.Response.StatusCode = 400;
ctx.Response.ContentType = Constants.ContentTypeText;
ctx.Response.Send("Bad request");
}
// Callback expecting a response object
static async Task<ListAllMyBucketsResult> ListBuckets(S3Context ctx)
{
return new ListAllMyBucketsResult();
}
static async Task<bool> BucketExists(S3Context ctx)
{
return true;
// throw new S3Exception(new Error(ErrorCode.NoSuchBucket));
}
// Callback passing object to you
static async Task BucketWriteTags(S3Context ctx, Tagging tags)
{
return;
}
Use the following example with the AWSSDK.S3 NuGet package to point your S3 client toward S3Server.
using Amazon;
using Amazon.Runtime;
using Amazon.S3;
using Amazon.S3.Model;
BasicAWSCredentials cred = new Amazon.Runtime.BasicAWSCredentials("access key", "secret key");
AmazonS3Config config = new AmazonS3Config
{
RegionEndpoint = RegionEndpoint.USWest1,
ServiceURL = "http://localhost:8000/",
ForcePathStyle = true, // required if not using virtual hosting style
UseHttp = true
};
IAmazonS3 client = new AmazonS3Client(cred, config);
An S3Context object is passed to your callbacks which includes three properties:
S3Request - the parsed S3 requestS3Response - the response object with which you will interact to send a responseMetadata - an object that you can choose to set with your own value
PreRequestHandler for authentication or other purposesS3Server expects the code you implement in your callbacks to either:
S3Server.Bucket.Exists, expects a Boolean)S3Server.Object.DeleteTagging)S3Exception with the appropriate Error object if something goes wrongS3Server parses incoming HTTP requests, extracting key pieces of information to determine the type of request sent by the caller. The logic to handle these requests is NOT provided by S3Server; you have to create that logic yourself in your callbacks. Callbacks are called when a request of that type has been received, otherwise, a generic 400 error is returned to the client.
Refer to https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html for the S3 API documentation used to create this project.
The following callbacks are supported:
| Callback Name | Description | Method | URL |
|---|---|---|---|
| Service.ListBuckets | List buckets | GET | / |
| Service.ServiceExists | Retrieve region for the service | HEAD | / |
| Callback Name | Description | Method | URL |
|---|---|---|---|
| Bucket.Delete | Delete a bucket | DELETE | /[bucket] |
| Bucket.DeleteAcl | Delete ACLs from a bucket | DELETE | /[bucket]?acl |
| Bucket.DeleteTagging | Delete tags from a bucket | DELETE | /[bucket]?tagging |
| Bucket.DeleteWebsite | Delete bucket website configuration | DELETE | /[bucket]?website |
| Bucket.Exists | Check if a bucket exists | HEAD | /[bucket] |
| Bucket.Read | Enumerate a bucket | GET | /[bucket] |
| Bucket.ReadAcl | Read ACL on a bucket | GET | /[bucket]?acl |
| Bucket.ReadLocation | Read a bucket's region | GET | /[bucket]?location |
| Bucket.ReadLogging | Read bucket's logging configuration | GET | /[bucket]?logging |
| Bucket.ReadTagging | Read tags on a bucket | GET | /[bucket]?tagging |
| Bucket.ReadVersioning | Read bucket versioning | GET | /[bucket]?versioning |
| Bucket.ReadVersions | Read object versions in a bucket | GET | /[bucket]?versions |
| Bucket.ReadWebsite | Read bucket website configuration | GET | /[bucket]?website |
| Bucket.Write | Create a bucket | PUT | /[bucket] |
| Bucket.WriteAcl | Write an ACL to a bucket | PUT | /[bucket]?acl |
| Bucket.WriteLogging | Write bucket logging configuration | PUT | /[bucket]?logging |
| Bucket.WriteTagging | Write tags to a bucket | PUT | /[bucket]?tagging |
| Bucket.WriteVersioning | Write bucket versioning | PUT | /[bucket]?versioning |
| Bucket.WriteWebsite | Write bucket website configuration | PUT | /[bucket]?website |
| Callback Name | Description | Method | URL |
|---|---|---|---|
| Object.Delete | Delete an object | DELETE | /[bucket]/[key] |
| Object.DeleteTagging | Delete an object's tags | DELETE | /[bucket]/[key]?tagging |
| Object.DeleteMultiple | Delete multiple objects | POST | /[bucket]?delete^2 |
| Object.Exists | Check if an object exists | HEAD | /[bucket]/[key] |
| Object.Write | Write an object | PUT | /[bucket]/[key] |
| Object.WriteAcl | Write an object access control list | PUT | /[bucket]/[key]?acl |
| Object.WriteTagging | Write tags to an object | PUT | /[bucket]/[key]?tagging |
| Object.WriteLegalHold | Write a legal hold status to an object | PUT | /[bucket]/[key]?legal-hold |
| Object.WriteRetention | Write a retention status to an object | PUT | /[bucket]/[key]?retention |
| Object.Read | Read an object | GET | /[bucket]/[key] |
| Object.ReadAcl | Read an object's access control list | GET | /[bucket]/[key]?acl |
| Object.ReadLegalHold | Read an object's legal hold status | GET | /[bucket]/[key]?legal-hold |
| Object.ReadRange | Read a range of bytes from an object | GET | /[bucket]/[key]^1 |
| Object.ReadRetention | Read an object's retention status | GET | /[bucket]/[key]?retention |
| Object.ReadTagging | Read an object's tags | GET | /[bucket]/[key]?tagging |
^1 Refer to the Bytes header in S3Request.Headers for the range that should be retrieved.
^2 A delete multiple request body must be supplied.
Operations against the service or AWS accounts is not exposed through callbacks.
The following bucket operations are not exposed through callbacks:
The following object operations are not exposed through callbacks:
The following general capabilities are not yet supported by S3Server
These items may be addressed in a future release.
Refer to CHANGELOG.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 2 NuGet packages that depend on S3Server:
| Package | Downloads |
|---|---|
|
Less3
<3 Less3 is S3-compatible object storage that you can run on your laptop, server, or anywhere you like. |
|
|
View.Models
Database models, services, and supporting classes for for View AI. |
Showing the top 1 popular GitHub repositories that depend on S3Server:
| Repository | Stars |
|---|---|
|
jchristn/Less3
Less3 is an S3-compatible object storage server that runs on your laptop, servers, just about anywhere!
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.2.0 | 112 | 6/11/2026 |
| 7.1.0 | 294 | 5/10/2026 |
| 7.0.7 | 729 | 4/6/2026 |
| 7.0.6 | 110 | 4/6/2026 |
| 7.0.5 | 120 | 4/3/2026 |
| 7.0.4 | 157 | 4/2/2026 |
| 7.0.3 | 112 | 4/2/2026 |
| 7.0.2 | 113 | 4/2/2026 |
| 7.0.1 | 110 | 4/2/2026 |
| 6.0.36 | 501 | 3/22/2026 |
| 6.0.35 | 472 | 2/16/2026 |
| 6.0.34 | 119 | 2/6/2026 |
| 6.0.33 | 120 | 2/6/2026 |
| 6.0.31 | 125 | 2/6/2026 |
| 6.0.30 | 192 | 1/9/2026 |
| 6.0.29 | 2,925 | 10/14/2025 |
| 6.0.28 | 231 | 10/13/2025 |
| 6.0.27 | 977 | 9/7/2025 |
| 6.0.26 | 247 | 9/7/2025 |
| 6.0.25 | 234 | 9/7/2025 |
Dependency update and change to base domains.