diff --git a/query/lambda/lambda_function_use_latest_runtime.sql b/query/lambda/lambda_function_use_latest_runtime.sql index 1bed0af5..1e1b6e53 100644 --- a/query/lambda/lambda_function_use_latest_runtime.sql +++ b/query/lambda/lambda_function_use_latest_runtime.sql @@ -3,12 +3,12 @@ select arn as resource, case when package_type <> 'Zip' then 'skip' - when runtime in ('nodejs14.x', 'nodejs12.x', 'nodejs10.x', 'python3.8', 'python3.7', 'python3.6', 'ruby2.5', 'ruby2.7', 'java11', 'java8', 'go1.x', 'dotnetcore2.1', 'dotnetcore3.1') then 'ok' + when runtime in ('nodejs16.x', 'nodejs14.x', 'nodejs12.x', 'nodejs10.x', 'python3.9', 'python3.8', 'python3.7', 'python3.6', 'ruby2.5', 'ruby2.7', 'java11', 'java8', 'java8.al2', 'go1.x', 'dotnetcore2.1', 'dotnetcore3.1', 'dotnet6') then 'ok' else 'alarm' end as status, case when package_type <> 'Zip' then title || ' package type is ' || package_type || '.' - when runtime in ('nodejs14.x', 'nodejs12.x', 'nodejs10.x', 'python3.8', 'python3.7', 'python3.6', 'ruby2.5', 'ruby2.7', 'java11', 'java8', 'go1.x', 'dotnetcore2.1', 'dotnetcore3.1') then title || ' uses latest runtime - ' || runtime || '.' + when runtime in ('nodejs16.x', 'nodejs14.x', 'nodejs12.x', 'nodejs10.x', 'python3.9', 'python3.8', 'python3.7', 'python3.6', 'ruby2.5', 'ruby2.7', 'java11', 'java8', 'java8.al2', 'go1.x', 'dotnetcore2.1', 'dotnetcore3.1', 'dotnet6') then title || ' uses latest runtime - ' || runtime || '.' else title || ' uses ' || runtime || ' which is not the latest version.' end as reason, -- Additional Dimensions