{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-lambda-function.json",
  "title": "AWSLambdaFunctionProperties",
  "description": "Resource Type definition for AWS::Lambda::Function. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-lambda-function.json",
    "sourceSha256": "f37508887d9ece9df28823f20dec99080de81810b2548ad5f3f3d98c6070cbed"
  },
  "type": "object",
  "properties": {
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A description of the function."
    },
    "TracingConfig": {
      "description": "Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray.",
      "$ref": "#/$defs/TracingConfig"
    },
    "VpcConfig": {
      "description": "For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.",
      "$ref": "#/$defs/VpcConfig"
    },
    "RuntimeManagementConfig": {
      "description": "RuntimeManagementConfig",
      "$ref": "#/$defs/RuntimeManagementConfig"
    },
    "ReservedConcurrentExecutions": {
      "description": "The number of simultaneous executions to reserve for the function.",
      "type": "integer",
      "minimum": 0
    },
    "SnapStart": {
      "description": "The SnapStart setting of your function",
      "$ref": "#/$defs/SnapStart"
    },
    "FileSystemConfigs": {
      "maxItems": 1,
      "description": "Connection settings for an Amazon EFS file system. To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FileSystemConfig"
      }
    },
    "FunctionName": {
      "oneOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the Lambda function, up to 64 characters in length. If you don't specify a name, AWS CloudFormation generates one."
    },
    "Runtime": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the function's runtime."
    },
    "KmsKeyArn": {
      "oneOf": [
        {
          "pattern": "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key."
    },
    "PackageType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "Image",
            "Zip"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "PackageType."
    },
    "CodeSigningConfigArn": {
      "oneOf": [
        {
          "pattern": "arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:code-signing-config:csc-[a-z0-9]{17}",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A unique Arn for CodeSigningConfig resource"
    },
    "Layers": {
      "uniqueItems": false,
      "description": "A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "Tags": {
      "uniqueItems": true,
      "description": "A list of tags to apply to the function.",
      "insertionOrder": false,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "ImageConfig": {
      "description": "ImageConfig",
      "$ref": "#/$defs/ImageConfig"
    },
    "MemorySize": {
      "description": "The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value must be a multiple of 64 MB.",
      "type": "integer"
    },
    "DeadLetterConfig": {
      "description": "A dead letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.",
      "$ref": "#/$defs/DeadLetterConfig"
    },
    "Timeout": {
      "description": "The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.",
      "type": "integer",
      "minimum": 1
    },
    "Handler": {
      "oneOf": [
        {
          "pattern": "^[^\\s]+$",
          "type": "string",
          "maxLength": 128
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime"
    },
    "Code": {
      "description": "The code for the function.",
      "$ref": "#/$defs/Code"
    },
    "Role": {
      "oneOf": [
        {
          "pattern": "^arn:(aws[a-zA-Z-]*)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name (ARN) of the function's execution role."
    },
    "Environment": {
      "description": "Environment variables that are accessible from function code during execution.",
      "$ref": "#/$defs/Environment"
    },
    "EphemeralStorage": {
      "description": "A function's ephemeral storage settings.",
      "$ref": "#/$defs/EphemeralStorage"
    },
    "Architectures": {
      "minItems": 1,
      "maxItems": 1,
      "uniqueItems": true,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "x86_64",
          "arm64"
        ]
      }
    }
  },
  "typeName": "AWS::Lambda::Function",
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/SnapStartResponse",
    "/properties/SnapStartResponse/ApplyOn",
    "/properties/SnapStartResponse/OptimizationStatus"
  ],
  "required": [
    "Code",
    "Role"
  ],
  "writeOnlyProperties": [
    "/properties/Code",
    "/properties/Code/ImageUri",
    "/properties/Code/S3Bucket",
    "/properties/Code/S3Key",
    "/properties/Code/S3ObjectVersion",
    "/properties/Code/ZipFile"
  ],
  "createOnlyProperties": [
    "/properties/FunctionName"
  ],
  "$defs": {
    "ImageConfig": {
      "title": "AWSLambdaFunctionImageConfigDefinition",
      "type": "object",
      "properties": {
        "WorkingDirectory": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "WorkingDirectory."
        },
        "Command": {
          "maxItems": 1500,
          "uniqueItems": true,
          "description": "Command.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "EntryPoint": {
          "maxItems": 1500,
          "uniqueItems": true,
          "description": "EntryPoint.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "TracingConfig": {
      "description": "The function's AWS X-Ray tracing configuration. To sample and record incoming requests, set Mode to Active.",
      "title": "AWSLambdaFunctionTracingConfigDefinition",
      "type": "object",
      "properties": {
        "Mode": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "Active",
                "PassThrough"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The tracing mode."
        }
      },
      "additionalProperties": false
    },
    "VpcConfig": {
      "description": "The VPC security groups and subnets that are attached to a Lambda function. When you connect a function to a VPC, Lambda creates an elastic network interface for each combination of security group and subnet in the function's VPC configuration. The function can only access resources and the internet through that VPC.",
      "title": "AWSLambdaFunctionVpcConfigDefinition",
      "type": "object",
      "properties": {
        "SecurityGroupIds": {
          "maxItems": 5,
          "uniqueItems": false,
          "description": "A list of VPC security groups IDs.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "SubnetIds": {
          "maxItems": 16,
          "uniqueItems": false,
          "description": "A list of VPC subnet IDs.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "DeadLetterConfig": {
      "description": "The dead-letter queue for failed asynchronous invocations.",
      "title": "AWSLambdaFunctionDeadLetterConfigDefinition",
      "type": "object",
      "properties": {
        "TargetArn": {
          "oneOf": [
            {
              "pattern": "^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$",
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic."
        }
      },
      "additionalProperties": false
    },
    "RuntimeManagementConfig": {
      "title": "AWSLambdaFunctionRuntimeManagementConfigDefinition",
      "type": "object",
      "properties": {
        "UpdateRuntimeOn": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "Auto",
                "FunctionUpdate",
                "Manual"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Trigger for runtime update"
        },
        "RuntimeVersionArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Unique identifier for a runtime version arn"
        }
      },
      "required": [
        "UpdateRuntimeOn"
      ],
      "additionalProperties": false
    },
    "SnapStart": {
      "description": "The function's SnapStart setting. When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.",
      "title": "AWSLambdaFunctionSnapStartDefinition",
      "type": "object",
      "properties": {
        "ApplyOn": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "PublishedVersions",
                "None"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Applying SnapStart setting on function resource type."
        }
      },
      "required": [
        "ApplyOn"
      ],
      "additionalProperties": false
    },
    "SnapStartResponse": {
      "description": "The function's SnapStart Response. When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.",
      "title": "AWSLambdaFunctionSnapStartResponseDefinition",
      "type": "object",
      "properties": {
        "OptimizationStatus": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "On",
                "Off"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Indicates whether SnapStart is activated for the specified function version."
        },
        "ApplyOn": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "PublishedVersions",
                "None"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Applying SnapStart setting on function resource type."
        }
      },
      "additionalProperties": false
    },
    "Code": {
      "title": "AWSLambdaFunctionCodeDefinition",
      "type": "object",
      "properties": {
        "S3ObjectVersion": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "For versioned objects, the version of the deployment package object to use."
        },
        "S3Bucket": {
          "oneOf": [
            {
              "minLength": 3,
              "pattern": "^[0-9A-Za-z\\.\\-_]*(?<!\\.)$",
              "type": "string",
              "maxLength": 63
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account."
        },
        "ZipFile": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package.."
        },
        "S3Key": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 1024
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon S3 key of the deployment package."
        },
        "ImageUri": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "ImageUri."
        }
      },
      "additionalProperties": false
    },
    "Environment": {
      "description": "A function's environment variable settings.",
      "title": "AWSLambdaFunctionEnvironmentDefinition",
      "type": "object",
      "properties": {
        "Variables": {
          "additionalProperties": false,
          "description": "Environment variable key-value pairs.",
          "type": "object",
          "patternProperties": {
            "[a-zA-Z][a-zA-Z0-9_]+": {
              "type": "string"
            }
          }
        }
      },
      "additionalProperties": false
    },
    "FileSystemConfig": {
      "title": "AWSLambdaFunctionFileSystemConfigDefinition",
      "type": "object",
      "properties": {
        "Arn": {
          "oneOf": [
            {
              "pattern": "^arn:aws[a-zA-Z-]*:elasticfilesystem:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:access-point/fsap-[a-f0-9]{17}$",
              "type": "string",
              "maxLength": 200
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system."
        },
        "LocalMountPath": {
          "oneOf": [
            {
              "pattern": "^/mnt/[a-zA-Z0-9-_.]+$",
              "type": "string",
              "maxLength": 160
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The path where the function can access the file system, starting with /mnt/."
        }
      },
      "required": [
        "Arn",
        "LocalMountPath"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "title": "AWSLambdaFunctionTagDefinition",
      "type": "object",
      "properties": {
        "Value": {
          "oneOf": [
            {
              "minLength": 0,
              "type": "string",
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "Key": {
          "oneOf": [
            {
              "minLength": 1,
              "type": "string",
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key"
      ],
      "additionalProperties": false
    },
    "EphemeralStorage": {
      "description": "A function's ephemeral storage settings.",
      "title": "AWSLambdaFunctionEphemeralStorageDefinition",
      "type": "object",
      "properties": {
        "Size": {
          "description": "The amount of ephemeral storage that your function has access to.",
          "maximum": 10240,
          "type": "integer",
          "minimum": 512
        }
      },
      "required": [
        "Size"
      ],
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/FunctionName"
  ],
  "additionalProperties": false
}
