---
inputType: "CA10__CaAwsLambdaFunction__c"
testData:
  - file: "test-data.json"
importExtracts:
  - file: "/types/CA10__CaAwsLambdaFunction__c/object.extracts.yaml"
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "This policy doesn't apply to Lambda functions created using a container image."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "CA10__packageType__c"
        right:
          TEXT: "Image"
  - status: "INCOMPLIANT"
    currentStateMessage: "The Lambda Function Runtime is in the list of deprecated runtimes."
    remediationMessage: "Update the function to use a newer, supported runtime version."
    check:
      CONTAINS_ANY:
        arg:
          EXTRACT: "CA10__runtime__c"
        search:
          SET:
            itemType: "TEXT"
            items:
              - "nodejs"
              - "dotnetcore2.0"
              - "dotnetcore1.0"
              - "nodejs6.10"
              - "nodejs4.3-edge"
              - "nodejs4.3"
              - "nodejs8.10"
              - "python2.7"
              - "ruby2.5"
              - "nodejs10.x"
              - "dotnetcore2.1"
              - "dotnet5.0"
              - "python3.6"
              - "nodejs12.x"
              - "dotnetcore3.1"
              - "python3.7"
              - "nodejs14.x"
              - "ruby2.7"
              - "provided"
              - "go1.x"
              - "java8"
              - "dotnet7"
              - "nodejs16.x"
              - "python3.8"
              - "dotnet6"
              - "nodejs18.x"
              - "python3.9"
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "The Lambda function is using a supported runtime."


  


