diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj
index 68d27c995..dbdd730aa 100644
--- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj
+++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj
@@ -7,7 +7,7 @@
net6.0
enable
enable
- 1.3.0
+ 1.3.1
README.md
Amazon.Lambda.AspNetCoreServer.Hosting
Amazon.Lambda.AspNetCoreServer.Hosting
diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
index 7d97fa26a..ebb289c54 100644
--- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
+++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj
@@ -4,9 +4,9 @@
netstandard2.0;net5.0;net6.0
- 1.8.0
+ 1.8.1
Provides a bootstrap and Lambda Runtime API Client to help you to develop custom .NET Core Lambda Runtimes.
- 1.8.0
+ 1.8.1
Provides a bootstrap and Lambda Runtime API Client to help you to develop custom .NET Core Lambda Runtimes.
Amazon.Lambda.RuntimeSupport
Amazon.Lambda.RuntimeSupport
diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/FileDescriptorLogStream.cs b/Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/FileDescriptorLogStream.cs
index 00a9861a6..0b30674fd 100644
--- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/FileDescriptorLogStream.cs
+++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/FileDescriptorLogStream.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Buffers;
+using System.Text;
using Microsoft.Win32.SafeHandles;
using System.Collections.Concurrent;
@@ -22,7 +23,8 @@ public static class FileDescriptorLogFactory
public static StreamWriter GetWriter(string fileDescriptorId)
{
// AutoFlush must be turned out otherwise the StreamWriter might not send the data to the stream before the Lambda function completes.
- var writer = _writers.GetOrAdd(fileDescriptorId, (x) => new StreamWriter(new FileDescriptorLogStream(fileDescriptorId)) { AutoFlush = true });
+ // Set the buffer size to the same max size as CloudWatch Logs records.
+ var writer = _writers.GetOrAdd(fileDescriptorId, (x) => new StreamWriter(new FileDescriptorLogStream(fileDescriptorId), Encoding.UTF8, 256 * 1024) { AutoFlush = true });
return writer;
}