Serilog.Sinks.AmazonS3
2.0.0
dotnet add package Serilog.Sinks.AmazonS3 --version 2.0.0
NuGet\Install-Package Serilog.Sinks.AmazonS3 -Version 2.0.0
<PackageReference Include="Serilog.Sinks.AmazonS3" Version="2.0.0" />
<PackageVersion Include="Serilog.Sinks.AmazonS3" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.AmazonS3" />
paket add Serilog.Sinks.AmazonS3 --version 2.0.0
#r "nuget: Serilog.Sinks.AmazonS3, 2.0.0"
#:package Serilog.Sinks.AmazonS3@2.0.0
#addin nuget:?package=Serilog.Sinks.AmazonS3&version=2.0.0
#tool nuget:?package=Serilog.Sinks.AmazonS3&version=2.0.0
Serilog.Sinks.AmazonS3
Serilog.Sinks.AmazonS3 is a library to save logging information from Serilog to Amazon S3. The idea there was to upload log files to Amazon S3 to later evaluate them with Amazon EMR services. This project makes use of the Serilog.Sinks.File's code in a major part, so thanks to all the contributors of this project 👍.
Available for
- .NET 10.0
- .NET 11.0
Net Core and Net Framework latest and LTS versions
Basic usage
Check out the how to use file here.
Since version 2.0.0.0 every rolling interval is uploaded as one file once the interval is over or the logger is disposed, see How the log files reach Amazon S3. Use RollingInterval.Hour or RollingInterval.Minute if the logs have to be in the bucket sooner.
Install
dotnet add package Serilog.Sinks.AmazonS3
Special notice for read-only file systems (e.g. AWS Lambda)
AWS Lambda exposes the tmp folder for writing, so prepending /tmp/ to the path parameter of the AmazonS3 extension method allowed this sink to work with AWS Lambda.
Otherwise a similar exception is thrown:
Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: System.IO.IOException: Read-only file system
A Lambda environment can disappear before the current rolling interval is uploaded, and its events go with it. Dispose the logger at the end of the work or use a short rolling interval.
Change history
See the Changelog.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
<table> <tr> <td align="center"><a href="https://github.com/Galouw"><img src="https://avatars.githubusercontent.com/u/6368030?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Galouw</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=Galouw" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=Galouw" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/profet23"><img src="https://avatars.githubusercontent.com/u/2411974?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ben Grabkowitz</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=profet23" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=profet23" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/aherrmann13"><img src="https://avatars.githubusercontent.com/u/1924089?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Herrmann</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=aherrmann13" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=aherrmann13" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/qrczak0"><img src="https://avatars.githubusercontent.com/u/45206900?v=4?s=100" width="100px;" alt=""/><br /><sub><b>qrczak0</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=qrczak0" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=qrczak0" title="Documentation">📖</a></td> <td align="center"><a href="http://longfin.github.com"><img src="https://avatars.githubusercontent.com/u/128436?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Swen Mun</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=longfin" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=longfin" title="Documentation">📖</a></td> <td align="center"><a href="https://www.linkedin.com/in/barrymooring/"><img src="https://avatars.githubusercontent.com/u/1089628?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Barry Mooring</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=codingbadger" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=codingbadger" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/samburville"><img src="https://avatars.githubusercontent.com/u/7041731?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Burville</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=samburville" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=samburville" title="Documentation">📖</a></td> </tr> <tr> <td align="center"><a href="https://github.com/stylesm"><img src="https://avatars.githubusercontent.com/u/5602910?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Styles</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=stylesm" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=stylesm" title="Documentation">📖</a></td> <td align="center"><a href="http://vlecerf.com"><img src="https://avatars.githubusercontent.com/u/7376668?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Valentin LECERF</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=ioxFR" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=ioxFR" title="Documentation">📖</a></td> <td align="center"><a href="https://franzhuber23.blogspot.de/"><img src="https://avatars.githubusercontent.com/u/9639361?v=4?s=100" width="100px;" alt=""/><br /><sub><b>HansM</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=SeppPenner" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=SeppPenner" title="Documentation">📖</a> <a href="#example-SeppPenner" title="Examples">💡</a> <a href="#maintenance-SeppPenner" title="Maintenance">🚧</a> <a href="#projectManagement-SeppPenner" title="Project Management">📆</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=SeppPenner" title="Tests">⚠️</a></td> <td align="center"><a href="https://github.com/serilog-contrib"><img src="https://avatars.githubusercontent.com/u/78050538?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Serilog Contrib</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=serilog-contrib" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=serilog-contrib" title="Documentation">📖</a> <a href="#example-serilog-contrib" title="Examples">💡</a> <a href="#maintenance-serilog-contrib" title="Maintenance">🚧</a> <a href="#projectManagement-serilog-contrib" title="Project Management">📆</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=serilog-contrib" title="Tests">⚠️</a></td> <td align="center"><a href="https://github.com/seruminar"><img src="https://avatars.githubusercontent.com/u/35008875?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yuriy Sountsov</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=seruminar" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/kosovrzn"><img src="https://avatars.githubusercontent.com/u/13337834?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sergey Kosov</b></sub></a><br /><a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=kosovrzn" title="Code">💻</a> <a href="https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/commits?author=kosovrzn" title="Tests">⚠️</a></td> </tr> </table>
This project follows the all-contributors specification. Contributions of any kind welcome!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. net11.0 is compatible. |
-
net10.0
- AWSSDK.S3 (>= 4.1.2)
- Serilog (>= 4.4.0)
- Serilog.Sinks.PeriodicBatching (>= 5.0.0)
-
net11.0
- AWSSDK.S3 (>= 4.1.2)
- Serilog (>= 4.4.0)
- Serilog.Sinks.PeriodicBatching (>= 5.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 |
|---|---|---|
| 2.0.0 | 228 | 11/24/2026 |
| 1.8.0 | 1,622 | 11/23/2026 |
| 1.7.0 | 20,704 | 8/17/2026 |
| 1.6.0 | 147,734 | 3/24/2025 |
| 1.5.3 | 63,254 | 12/26/2024 |
| 1.5.2 | 90,629 | 5/16/2024 |
| 1.5.1 | 257,024 | 3/3/2024 |
| 1.5.0 | 9,197 | 11/21/2023 |
| 1.4.1 | 51,015 | 6/6/2023 |
| 1.4.0 | 27,950 | 4/7/2023 |
| 1.3.0 | 10,539 | 11/20/2022 |
| 1.2.9 | 20,350 | 10/30/2022 |
| 1.2.8 | 19,719 | 8/28/2022 |
| 1.2.7 | 51,961 | 8/3/2022 |
| 1.2.6 | 6,451 | 6/1/2022 |
| 1.2.5 | 19,129 | 2/16/2022 |
| 1.2.4 | 2,063 | 2/16/2022 |
| 1.2.3 | 6,136 | 1/12/2022 |
| 1.2.2 | 17,331 | 11/9/2021 |
| 1.2.1 | 1,958 | 11/4/2021 |
Version 2.0.0.0 (2026-11-24): Breaking change: every rolling interval is uploaded as one file once the interval is over or the logger is disposed instead of one file per batch, so log events reach Amazon S3 only after their interval (Fixes https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/issues/52). Documented how to combine `formatter` with further options (https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/issues/61) and that folders in `path` do not reach Amazon S3 (https://github.com/serilog-contrib/Serilog.Sinks.AmazonS3/issues/60).