Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update deprecated Lambda runtimes #3113

Merged
63 changes: 49 additions & 14 deletions src/cfnlint/data/AdditionalSpecs/LmbdRuntimeLifecycle.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,107 @@
{
"dotnet6": {
"deprecated": "2024-11-24",
"eol": "2025-01-11",
"successor": "dotnet8"
},
"dotnet7": {
"deprecated": "2026-11-08",
"eol": "2026-10-08",
"successor": "dotnet8"
},
"dotnetcore1.0": {
"deprecated": "2019-07-31",
"eol": "2019-06-27",
"successor": "dotnet6"
"successor": "dotnet8"
},
"dotnetcore2.0": {
"deprecated": "2019-05-30",
"eol": "2019-04-30",
"successor": "dotnet6"
"successor": "dotnet8"
},
"dotnetcore2.1": {
"deprecated": "2021-09-23",
"eol": "2021-08-23",
"successor": "dotnet6"
"successor": "dotnet8"
},
"dotnetcore3.1": {
"deprecated": "2023-02-20",
"eol": "2023-01-20",
"successor": "dotnet6"
"successor": "dotnet8"
},
"nodejs": {
"deprecated": "2016-10-31",
"eol": "2016-10-31",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs10.x": {
"deprecated": "2021-08-30",
"eol": "2021-07-30",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs12.x": {
"deprecated": "2022-12-14",
"eol": "2022-11-14",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs14.x": {
"deprecated": "2023-04-30",
"eol": "2024-01-09",
"successor": "nodejs20.x"
},
"nodejs16.x": {
"deprecated": "2023-09-11",
"eol": "2024-07-15",
"successor": "nodejs20.x"
},
"nodejs4.3": {
"deprecated": "2019-04-30",
"eol": "2018-04-30",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs4.3-edge": {
"deprecated": "2019-04-30",
"eol": "2018-04-30",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs6.10": {
"deprecated": "2019-08-12",
"eol": "2019-04-30",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"nodejs8.10": {
"deprecated": "2020-02-03",
"eol": "2019-12-31",
"successor": "nodejs16.x"
"successor": "nodejs20.x"
},
"python2.7": {
"deprecated": "2021-09-30",
"eol": "2021-07-15",
"successor": "python3.9"
"successor": "python3.12"
},
"python3.6": {
"deprecated": "2022-08-17",
"eol": "2022-07-18",
"successor": "python3.9"
"successor": "python3.12"
},
"python3.7": {
"deprecated": "2023-12-04",
"eol": "2024-01-09",
"successor": "python3.12"
},
"python3.8": {
"deprecated": "2024-10-14",
"eol": "2024-11-13",
"successor": "python3.12"
},
"ruby2.5": {
"deprecated": "2021-08-30",
"eol": "2021-07-30",
"successor": "ruby2.7"
"successor": "ruby3.2"
},
"ruby2.7": {
"deprecated": "2023-12-07",
"eol": "2024-01-09",
"successor": "ruby3.2"
}
}
2 changes: 1 addition & 1 deletion test/fixtures/results/public/lambda-poller.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"LineNumber": 151
}
},
"Message": "Deprecated runtime (nodejs6.10) specified. Updating disabled since 2019-08-12. Please consider updating to nodejs16.x",
"Message": "Deprecated runtime (nodejs6.10) specified. Updating disabled since 2019-08-12. Please consider updating to nodejs20.x",
"Rule": {
"Description": "Check if an EOL Lambda Runtime is specified and give an error if used. ",
"Id": "E2531",
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/results/quickstart/nist_config_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"LineNumber": 94
}
},
"Message": "Deprecated runtime (nodejs) specified. Updating disabled since 2016-10-31. Please consider updating to nodejs16.x",
"Message": "Deprecated runtime (nodejs) specified. Updating disabled since 2016-10-31. Please consider updating to nodejs20.x",
"Rule": {
"Description": "Check if an EOL Lambda Runtime is specified and give an error if used. ",
"Id": "E2531",
Expand Down Expand Up @@ -152,7 +152,7 @@
"LineNumber": 159
}
},
"Message": "Deprecated runtime (nodejs) specified. Updating disabled since 2016-10-31. Please consider updating to nodejs16.x",
"Message": "Deprecated runtime (nodejs) specified. Updating disabled since 2016-10-31. Please consider updating to nodejs20.x",
"Rule": {
"Description": "Check if an EOL Lambda Runtime is specified and give an error if used. ",
"Id": "E2531",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Resources:
Code:
S3Bucket: my-bucket
S3Key: function.zip
# Runtime: nodejs16.x
# Runtime: nodejs20.x
Function2:
Type: AWS::Lambda::Function
Properties:
Expand All @@ -27,6 +27,6 @@ Resources:
Role: arn:aws:iam::123456789012:role/lambda-role
Code:
ZipFile: |
var aws = require('aws-sdk')
import {LambdaClient} from '@aws-sdk/client-lambda';
exports.handler = function(event, context) {}
# Runtime: nodejs16.x
# Runtime: nodejs20.x
2 changes: 1 addition & 1 deletion test/fixtures/templates/good/functions/join.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Resources:
Type: "AWS::Serverless::Function"
Properties:
Handler: index.handler
Runtime: python3.7
Runtime: python3.12
InlineCode: |
import cfnresponse
def handler(event, context):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Resources:
Role: arn:aws:iam::123456789012:role/lambda-role
Code:
ZipFile: |
var aws = require('aws-sdk')
import { LambdaClient } from '@aws-sdk/client-lambda';
exports.handler = function(event, context) {}
Runtime: nodejs16.x
Runtime: nodejs20.x
Function3: # image deployment
Type: AWS::Lambda::Function
Properties:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/templates/good/transform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs14.x
Runtime: nodejs20.x
CodeUri: 's3://testBucket/mySourceCode.zip'
ExampleLayer:
Type: AWS::Serverless::LayerVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Resources:
Properties:
CodeUri: '.'
Handler: main.handler
Runtime: python3.7
Runtime: python3.12
Timeout: 30
MemorySize: 128
AutoPublishAlias: !Ref Stage1
Expand All @@ -31,7 +31,7 @@ Resources:
Properties:
CodeUri: '.'
Handler: main.handler
Runtime: python3.7
Runtime: python3.12
Timeout: 30
MemorySize: 128
FunctionName: !Sub "Stage-${Stage2}-${AWS::Region}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Resources:
Properties:
FunctionName: !Sub "my-custom-authorizer-${AWS::Region}"
Description: Custom authorizer for APIGW
Runtime: nodejs16.x
Runtime: nodejs20.x
Handler: index.handler
CodeUri: !Sub "s3://custom-authz-${AWS::AccountId}-${AWS::Region}/function-v1.0.zip"
Policies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Resources:
Properties:
PackageType: Image
Metadata:
DockerTag: nodejs14.x-v1
DockerTag: nodejs20.x-v1
DockerContext: ./hello-world
Dockerfile: Dockerfile
2 changes: 1 addition & 1 deletion test/fixtures/templates/good/transform/list_transform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Resources:
Properties:
CodeUri: "."
Handler: main.handler
Runtime: python3.7
Runtime: python3.12
Timeout: 30
MemorySize: 128
AutoPublishAlias: !Ref Stage1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Transform:
Globals:
Function:
Timeout: 3
Runtime: nodejs14.x
Runtime: nodejs20.x
Environment:
Variables:
VARIABLE: VALUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resources:
Code:
ZipFile: '.'
Handler: main.handler
Runtime: python3.7
Runtime: python3.12
Timeout: 30
MemorySize: 128
Role: arn:aws:iam::123456789012:role/role-name
2 changes: 1 addition & 1 deletion test/fixtures/templates/good/transform_serverless_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs14.x
Runtime: nodejs20.x
CodeUri: 's3://testBucket/mySourceCode.zip'
AutoPublishAlias: live
DeploymentPreference:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs14.x
Runtime: nodejs20.x
CodeUri: 's3://testBucket/mySourceCode.zip'
AutoPublishAlias: live
DeploymentPreference:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_good_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class TestQuickStartTemplates(BaseCliTestCase):
"Path": ["Resources", "myFunction", "Properties", "Runtime"],
"Start": {"ColumnNumber": 3, "LineNumber": 10},
},
"Message": "Deprecated runtime (nodejs6.10) specified. Updating disabled since 2019-08-12. Please consider updating to nodejs16.x",
"Message": "Deprecated runtime (nodejs6.10) specified. Updating disabled since 2019-08-12. Please consider updating to nodejs20.x",
"Rule": {
"Description": "Check if an EOL Lambda Runtime is specified and give an error if used. ",
"Id": "E2531",
Expand Down