-
Notifications
You must be signed in to change notification settings - Fork 494
Closed
Labels
Description
Describe the bug
When .NET 7 AOT lamdba is being deployed to al2 runtime (Custom runtime on Amazon Linux 2)
it's impossible for it to create Provisioned concurrency as it errors with:
Custom runtime on Amazon Linux 2
'Failed FUNCTION_ERROR_INIT_FAILURE(0/10)'
In logs I can see:
Expected Behavior
Provisioned concurrency works as expected, function initializes and starts.
Current Behavior
Reproduction Steps
We are having this issue in production for our functions ,but it is reproducable for a simple lambda.NativeAOT template:
- Create new lambda project => dotnet new lambda.NativeAOT
- Deploy it => dotnet lambda deploy-function
- Create version, e.g. 1
- Go to AWS Console => Lamdba => Configuration => Concurrency
- Create Provisioned concurrency configuration
- Wait
Possible Solution
No response
Additional Information/Context
Project configuration:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AWSProjectType>Lambda</AWSProjectType>
<AssemblyName>bootstrap</AssemblyName>
<!-- This property makes the build directory similar to a publish directory and helps the AWS .NET Lambda Mock Test Tool find project dependencies. -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Generate Native AOT image during publishing to improve cold start time. -->
<PublishAot>true</PublishAot>
<!-- StripSymbols tells the compiler to strip debugging symbols from the final executable if we're on Linux and put them into their own file.
This will greatly reduce the final executable's size.-->
<StripSymbols>true</StripSymbols>
</PropertyGroup>
AWS .NET SDK and/or Package version used
<PackageReference Include="Amazon.Lambda.RuntimeSupport" Version="1.8.2" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" />
Targeted .NET Platform
.NET 7
Operating System and version
AmazonLinux2 (provided.al2)


