{
  "slug": "sam-package-supports-resolve-image-repos-caf212e0fb83",
  "title": "sam package supports --resolve-image-repos",
  "tools": [
    "sam"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-01-28T19:17:50.000Z",
  "announced_at": "2026-01-28T19:17:50.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When packaging a SAM template with image-based functions, run `sam package` with `--resolve-image-repos` to enable automatic image repository resolution.",
    "examples": [
      "sam package --template-file <template.yaml> --s3-bucket <bucket> --resolve-image-repos"
    ],
    "gotchas": [
      "Version: v1.153.1",
      "--resolve-image-repos: Flag that enables automatic ECR repository resolution; it takes no value.",
      "--s3-bucket <bucket> (required): S3 bucket for package artifacts when `--resolve-s3` is not used. The v1.153.1 source raises an error if image repositories are being resolved and no bucket is set.",
      "--template-file <template.yaml>: Path to the SAM template; the command otherwise searches the current project directory for a template.",
      "Prerequisite: The `sam package` command requires AWS credentials.",
      "Prerequisite: Provide `--s3-bucket <bucket>` or use `--resolve-s3` to supply a bucket when resolving image repositories.",
      "Docs conflict: The current AWS `sam package` reference page does not list `--resolve-image-repos`; the v1.153.1 official source defines and attaches it to `sam package`. https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-package.html"
    ]
  },
  "why_it_matters": "Package a SAM application that uses image repositories with the repository resolution option.",
  "sources": [
    "https://github.com/aws/aws-sam-cli/releases/tag/v1.153.1",
    "https://github.com/aws/aws-sam-cli/blob/v1.153.1/samcli/commands/package/command.py",
    "https://github.com/aws/aws-sam-cli/blob/v1.153.1/samcli/commands/_utils/options.py",
    "https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-package.html"
  ],
  "rank": 0.95026,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-1de5c87902cf3a03-0:gate",
    "evidence_hash": "d92d2bd88a9b439b2aa9b668ed33124b350ab957f2a7b86412cbff849da71c70"
  },
  "review": {
    "draft_hash": "611dceeb16eb8b0b3464e79b18885065f04acde2d22fd01a62ca88dd4b3bbd27",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
