{
  "schemaVersion": "ebb.rule.v1",
  "id": "serverless.aws-lambda.java8.al2",
  "ecosystem": "serverless",
  "purl": "pkg:generic/aws-lambda-runtime/java8.al2",
  "affectedVersions": "vers:semver/*",
  "event": "scheduled-end-of-life",
  "severity": "low",
  "title": "AWS Lambda Java 8 (Amazon Linux 2) runtime reaches end of life on 2027-06-30",
  "summary": "The AWS Lambda runtimes table lists java8.al2 as supported with a projected deprecation date of 2027-06-30. After that date AWS no longer applies security or other updates to that managed runtime.",
  "replacement": "java25 or java21",
  "deadline": "2027-06-30",
  "sources": [
    {
      "title": "AWS Lambda runtimes",
      "url": "https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html",
      "accessedAt": "2026-10-30"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-30",
    "reviewedAt": "2026-10-30",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep provider.runtime, Globals.Function.Runtime, per-function Runtime, and Terraform aws_lambda_function.runtime on one AWS Lambda runtime identifier that AWS still supports.",
      "Raising the managed runtime can require Java language and library changes; confirm the handler and its dependencies run on the replacement before deploying.",
      "This runtime is still supported today; the rule is a warning ahead of the announced date, so plan the move before it."
    ],
    "steps": [
      {
        "id": "raise-lambda-runtime",
        "title": "Raise the AWS Lambda runtime",
        "instructions": "Change the reported Runtime (or provider.runtime / terraform runtime) from java8.al2 to a supported AWS Lambda Java identifier (see the replacement).",
        "targets": "declaration"
      },
      {
        "id": "align-lambda-runtime-surfaces",
        "title": "Align other runtime surfaces",
        "instructions": "Update every other SAM/CloudFormation Globals or function Runtime, serverless.yml provider or function runtime, Terraform aws_lambda_function.runtime, and CI deploy config that still pins java8.al2.",
        "targets": "all"
      }
    ],
    "verification": [
      {
        "command": "sam validate || serverless print || terraform validate",
        "purpose": "Validate the updated SAM, Serverless Framework, or Terraform declaration before deploy."
      }
    ]
  }
}
