Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=10.0.0-preview.7.25380.108
ARG ASPNET_SHA512=f689f386f7fa56b9b53bd7d510abecf2b9c22358fb29367846c23fbba7b0a61a47d86dbceef96b73a728af076e55c346838497402e0cd80b8695d9dc1ea3c2b9
ARG ASPNET_VERSION=10.0.0-rc.1.25451.107
ARG ASPNET_SHA512=d2219850cab73cebe3625a3e5321c67e2921d3bfefb6c238044a21d8a95ca07ca731507ba7c027a8b03fe8eeba7f23d8d884d34f02437d6a5830423484053d70

ARG LAMBDA_RUNTIME_NAME=dotnet10
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=10.0.0-preview.7.25380.108
ARG ASPNET_SHA512=81358ed46adffd1a4e2e095e3d23d67d1d289a6c4c50ab20e1e71161b2823c8c44dd5a6c241ac9b3fcd4a2af518dbffbccdb7b3acd07a42af9ff24c5fd62c6a3
ARG ASPNET_VERSION=10.0.0-rc.1.25451.107
ARG ASPNET_SHA512=bd86bac48405084fecb610260e60a1f645de455dfaf208caec9771af160fd1d7bdc99a4a1f88169c1cef7595536d55dc571472ca7a15928271d40ae45fdedefa

ARG LAMBDA_RUNTIME_NAME=dotnet10
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=8.0.19
ARG ASPNET_SHA512=9503fe84627716cb9df02c648e34971c6ec4d44686f213bc6f6bd74bc54ffb41ef272fbd2c8aa3f0a309b20664796c12f9c77b137015f84581ac265af2f21687
ARG ASPNET_VERSION=8.0.20
ARG ASPNET_SHA512=228713f3c3600c49e7924e26dc86115c9674b5308b44514a53f670fa785038aa885ead8cd2c1c1850d1565b689a95a92e97f472d86429930dbfb114aa6020eb7

ARG LAMBDA_RUNTIME_NAME=dotnet8
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=8.0.19
ARG ASPNET_SHA512=cc14503e5c1d94a333fd8048f628760f6df2b2acd4e0d5ef465cbbfcc13517753d6fd5b1d5fe4b38b07704418a713e1338005453a7cbb8fb3f300760d00fc6e6
ARG ASPNET_VERSION=8.0.20
ARG ASPNET_SHA512=17b01d6309899eea40200fc449cb606df5541c5802b973c21e71d7f5539b72cb35e2daf38bd9e17ec6dccfb23c3c17afdb1e7f05fb13f10701561d2e00b19645

ARG LAMBDA_RUNTIME_NAME=dotnet8
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=9.0.8
ARG ASPNET_SHA512=08afdf924d00f875b44cc4eff68b55fb9b63e4cc68e6b5cde873da2bce9c5b5f4120e869b6a1dfdea4ab104ab0ac8783ef1577b4d3275aae899a53cd88130f1d
ARG ASPNET_VERSION=9.0.9
ARG ASPNET_SHA512=7ff1b517c45b2c7720fc1be808842c5b7f644ff9138f221862620e23660db528b5961f791434aa75885c808ecb3bf9d213a33e8ff3eaa477df7d6256d215a6c4

ARG LAMBDA_RUNTIME_NAME=dotnet9
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
4 changes: 2 additions & 2 deletions LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Based on Docker image from: https://github.com/dotnet/dotnet-docker/

ARG ASPNET_VERSION=9.0.8
ARG ASPNET_SHA512=cf1e72f4b327b93c1ac3f2def9ca83bee27a408e5b5913f84ed954cfd6c4639da1664fe3f4e3925883db77ed29fa5364b9ca8af3796f33ca73a4cb7484e326bc
ARG ASPNET_VERSION=9.0.9
ARG ASPNET_SHA512=cd2d24e16edfdbd34287a4ae25e0a517aaf1bbfa0ffd4d3bc7eac63d85dd544d43b12d081aa2419af13ac27fdb524f918ecf2fdfa916039aed66d502318a72ee

ARG LAMBDA_RUNTIME_NAME=dotnet9
ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
Expand Down
2 changes: 1 addition & 1 deletion LambdaRuntimeDockerfiles/update-dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Update-Dockerfile ([string]$DockerfilePath, [string]$NextVersion) {

$checksumUri = "https://dotnetcli.blob.core.windows.net/dotnet/checksums/${NextVersion}-sha.txt"

if ($NextVersion -match "^(\d+\.\d+\.\d+-preview\.\d+)") {
if ($NextVersion -match "^(\d+\.\d+\.\d+-preview\.\d+)" -or $NextVersion -match "^(\d+\.\d+\.\d+-rc\.\d+)" ) {
$matchedVersion = $matches[1]
$checksumUri = "https://dotnetcli.blob.core.windows.net/dotnet/checksums/${matchedVersion}-sha.txt"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\..\buildtools\common.props" />

Expand All @@ -13,7 +13,9 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
<LangVersion>9.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>NU5048;NU1903;NU1902</NoWarn>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(ExecutableOutputType)'=='true' ">
Expand All @@ -22,7 +24,6 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0' or '$(TargetFramework)' == 'net9.0' or '$(TargetFramework)' == 'net10.0'">
<WarningsAsErrors>IL2026,IL2067,IL2075</WarningsAsErrors>
<IsTrimmable>true</IsTrimmable>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
Expand Down Expand Up @@ -29,8 +29,11 @@ public class HandlerWrapper : IDisposable
private static readonly InvocationResponse EmptyInvocationResponse =
new InvocationResponse(new MemoryStream(0), false);

private MemoryStream OutputStream = new MemoryStream();
private readonly MemoryStream OutputStream = new MemoryStream();

/// <summary>
/// The handler that will be called for each event.
/// </summary>
public LambdaBootstrapHandler Handler { get; private set; }

private HandlerWrapper(LambdaBootstrapHandler handler)
Expand Down Expand Up @@ -163,7 +166,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, ILambdaConte
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler()
/// Example handler signature: Task&lt;Stream&gt; Handler()
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <returns>A HandlerWrapper</returns>
Expand All @@ -178,7 +181,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Task<Stream>> handler)
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler(Stream)
/// Example handler signature: Task&lt;Stream&gt; Handler(Stream)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <returns>A HandlerWrapper</returns>
Expand All @@ -193,7 +196,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Stream, Task<Stream>> handle
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler(PocoIn)
/// Example handler signature: Task&lt;Stream&gt; Handler(PocoIn)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -210,7 +213,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, Task<Stream>
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler(ILambdaContext)
/// Example handler signature: Task&lt;Stream&gt; Handler(ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <returns>A HandlerWrapper</returns>
Expand All @@ -225,7 +228,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<ILambdaContext, Task<Stream>
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler(Stream, ILambdaContext)
/// Example handler signature: Task&lt;Stream&gt; Handler(Stream, ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <returns>A HandlerWrapper</returns>
Expand All @@ -240,7 +243,7 @@ public static HandlerWrapper GetHandlerWrapper(Func<Stream, ILambdaContext, Task
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltStream&gt Handler(PocoIn, ILambdaContext)
/// Example handler signature: Task&lt;Stream&gt; Handler(PocoIn, ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -257,7 +260,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput>(Func<TInput, ILambdaConte
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler()
/// Example handler signature: Task&lt;PocoOut&gt; Handler()
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -279,7 +282,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Task<TOutput>> hand
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler(Stream)
/// Example handler signature: Task&lt;PocoOut&gt; Handler(Stream)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -301,7 +304,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Stream, Task<TOutpu
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler(PocoIn)
/// Example handler signature: Task&lt;PocoOut&gt; Handler(PocoIn)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -324,7 +327,7 @@ public static HandlerWrapper GetHandlerWrapper<TInput, TOutput>(Func<TInput, Tas
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler(ILambdaContext)
/// Example handler signature: Task&lt;PocoOut&gt; Handler(ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -346,7 +349,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<ILambdaContext, Tas
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler(Stream, ILambdaContext)
/// Example handler signature: Task&lt;PocoOut&gt; Handler(Stream, ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand All @@ -368,7 +371,7 @@ public static HandlerWrapper GetHandlerWrapper<TOutput>(Func<Stream, ILambdaCont
/// <summary>
/// Get a HandlerWrapper that will call the given method on function invocation.
/// Note that you may have to cast your handler to its specific type to help the compiler.
/// Example handler signature: Task&ltPocoOut&gt Handler(PocoIn, ILambdaContext)
/// Example handler signature: Task&lt;PocoOut&gt; Handler(PocoIn, ILambdaContext)
/// </summary>
/// <param name="handler">Func called for each invocation of the Lambda function.</param>
/// <param name="serializer">ILambdaSerializer to use when calling the handler</param>
Expand Down Expand Up @@ -719,6 +722,9 @@ public static HandlerWrapper GetHandlerWrapper<TInput, TOutput>(Func<TInput, ILa
#region IDisposable Support
private bool disposedValue = false; // To detect redundant calls

/// <summary>
/// Dispose the HandlerWrapper
/// </summary>
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
Expand All @@ -732,6 +738,9 @@ protected virtual void Dispose(bool disposing)
}
}

/// <summary>
/// Dispose the HandlerWrapper
/// </summary>
public void Dispose()
{
Dispose(true);
Expand Down
Loading
Loading