From 34f50b287505f54f1535261c8a86e8ccf2aa927c Mon Sep 17 00:00:00 2001 From: Harold Sun Date: Fri, 13 Nov 2026 00:10:58 +0000 Subject: [PATCH] fix(examples): make validate pass on cfn-lint 1.58 (LMI GetAtt, dotnet8 EOL) - fastapi-response-streaming-lmi: cfn-lint's bundled SAM schema for AWS::Serverless::CapacityProvider declares no attributes, so !GetAtt LMICapacityProvider.Arn fails E1010 (function) and E6101 (output). Ignore E1010 on FastAPIFunction and E6101 at template level (Outputs cannot carry Metadata) until cfn-lint ships the attribute. - aspnet-mvc-zip, aspnet-webapi-zip: dotnet8 was deprecated on 2026-11-10 (W2531). Move to dotnet10 and net10.0. --- examples/aspnet-mvc-zip/README.md | 2 +- .../src/AspNetLambdaZipWebAdapter.csproj | 2 +- examples/aspnet-mvc-zip/template.yaml | 2 +- examples/aspnet-webapi-zip/README.md | 2 +- .../aspnet-webapi-zip/src/AspNetWebApi.csproj | 2 +- examples/aspnet-webapi-zip/template.yaml | 2 +- .../template.yaml | 17 +++++++++++++++++ 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/examples/aspnet-mvc-zip/README.md b/examples/aspnet-mvc-zip/README.md index 579782e0..dcf6ad9b 100644 --- a/examples/aspnet-mvc-zip/README.md +++ b/examples/aspnet-mvc-zip/README.md @@ -2,7 +2,7 @@ This example shows how to deploy an ASP.NET application using the Lambda Web Adapter packaged as a ZIP file. -The `dotnet8` runtime is used. +The `dotnet10` runtime is used. ```yaml Resources: diff --git a/examples/aspnet-mvc-zip/src/AspNetLambdaZipWebAdapter.csproj b/examples/aspnet-mvc-zip/src/AspNetLambdaZipWebAdapter.csproj index 29ce449c..4976e146 100644 --- a/examples/aspnet-mvc-zip/src/AspNetLambdaZipWebAdapter.csproj +++ b/examples/aspnet-mvc-zip/src/AspNetLambdaZipWebAdapter.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable diff --git a/examples/aspnet-mvc-zip/template.yaml b/examples/aspnet-mvc-zip/template.yaml index 7433a9f2..0aecb380 100644 --- a/examples/aspnet-mvc-zip/template.yaml +++ b/examples/aspnet-mvc-zip/template.yaml @@ -4,7 +4,7 @@ Transform: AWS::Serverless-2016-10-31 Globals: Function: MemorySize: 1024 - Runtime: dotnet8 + Runtime: dotnet10 Architectures: - x86_64 Timeout: 29 diff --git a/examples/aspnet-webapi-zip/README.md b/examples/aspnet-webapi-zip/README.md index 081f8439..d5ee2abf 100644 --- a/examples/aspnet-webapi-zip/README.md +++ b/examples/aspnet-webapi-zip/README.md @@ -2,7 +2,7 @@ This example shows how to deploy an ASP.NET application using the Lambda Web Adapter packaged as a ZIP file. -The `dotnet8` runtime is used. +The `dotnet10` runtime is used. ```yaml Resources: diff --git a/examples/aspnet-webapi-zip/src/AspNetWebApi.csproj b/examples/aspnet-webapi-zip/src/AspNetWebApi.csproj index f2e3d01a..5df11923 100644 --- a/examples/aspnet-webapi-zip/src/AspNetWebApi.csproj +++ b/examples/aspnet-webapi-zip/src/AspNetWebApi.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable true diff --git a/examples/aspnet-webapi-zip/template.yaml b/examples/aspnet-webapi-zip/template.yaml index 462a18f6..5fd0e5b1 100644 --- a/examples/aspnet-webapi-zip/template.yaml +++ b/examples/aspnet-webapi-zip/template.yaml @@ -4,7 +4,7 @@ Transform: AWS::Serverless-2016-10-31 Globals: Function: MemorySize: 1024 - Runtime: dotnet8 + Runtime: dotnet10 Architectures: - x86_64 Timeout: 29 diff --git a/examples/fastapi-response-streaming-lmi/template.yaml b/examples/fastapi-response-streaming-lmi/template.yaml index c8a5f875..464d80ee 100644 --- a/examples/fastapi-response-streaming-lmi/template.yaml +++ b/examples/fastapi-response-streaming-lmi/template.yaml @@ -2,6 +2,15 @@ AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: FastAPI response streaming with Lambda Managed Instances +# Template-level because Outputs cannot carry Metadata. E6101 trips on the +# CapacityProviderArn output for the same cfn-lint schema gap noted on +# FastAPIFunction below. Remove both ignores once cfn-lint ships the attribute. +Metadata: + cfn-lint: + config: + ignore_checks: + - E6101 + Parameters: SubnetIds: Type: List @@ -28,6 +37,14 @@ Resources: FastAPIFunction: Type: AWS::Serverless::Function + # cfn-lint's bundled SAM schema for AWS::Serverless::CapacityProvider declares no + # attributes, so !GetAtt LMICapacityProvider.Arn fails E1010 even though SAM + # supports it. Remove once cfn-lint ships the attribute (checked on 1.58.0). + Metadata: + cfn-lint: + config: + ignore_checks: + - E1010 Properties: CodeUri: app/ Handler: run.sh