{"record":{"id":"746a1b9b12400d4a","repo":"oven-sh/bun","slug":"no-base-image-found-inspect-options","errorCode":null,"errorMessage":"No base image found: ${inspect(options)}","messagePattern":"No base image found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/machine.mjs","lineNumber":407,"sourceCode":"      if (!distro || distro === \"server\") {\n        owner = \"amazon\";\n        name = `Windows_Server-${release || \"*\"}-English-Full-Base-*`;\n      }\n    }\n\n    if (!name) {\n      throw new Error(`Unsupported platform: ${inspect(options)}`);\n    }\n\n    const baseImages = await aws.describeImages({\n      \"state\": \"available\",\n      \"owner-alias\": owner,\n      \"name\": name,\n    });\n    // console.table(baseImages.map(v => v.Name));\n\n    if (!baseImages.length) {\n      throw new Error(`No base image found: ${inspect(options)}`);\n    }\n\n    const [baseImage] = baseImages;\n    return aws.getAvailableImage(baseImage);\n  },\n\n  /**\n   * @param {MachineOptions} options\n   * @returns {Promise<Machine>}\n   */\n  async createMachine(options) {\n    const { os, arch, imageId, instanceType, tags, sshKeys, preemptible } = options;\n\n    /** @type {AwsImage} */\n    let image;\n    if (imageId) {\n      image = await aws.getAvailableImage(imageId);\n    } else {","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/machine.mjs#L389-L425","documentation":"After building an AMI name pattern from platform options, getBaseImage() calls describeImages with owner-alias + name filters; zero matches throws. The pattern was syntactically fine but nothing in this region matches owner+name.","triggerScenarios":"release filter too specific (e.g. ubuntu '24.04' pattern not published under owner 099720109477 in that region); aws-marketplace CentOS subscription not accepted in the account; images for that release were deprecated/removed; wrong region for that owner alias.","commonSituations":"A new distro release string that hasn't propagated to AMI names yet; running in a region where the canonical owner doesn't publish that image; marketplace terms not accepted so describeImages hides them.","solutions":["List matching images manually to see what exists: `aws ec2 describe-images --owners <owner> --filters Name=name,Values='<pattern>' --region <region>`","Relax release to '*' (omit it) to get the latest available image","Accept marketplace terms for the account, or pass an explicit imageId","Confirm you're searching the region the machine will run in"],"exampleFix":"// before\nawait aws.getBaseImage({ os: 'linux', arch: 'x64', distro: 'ubuntu', release: '24.04' });\n\n// after (fall back to latest matching release)\nawait aws.getBaseImage({ os: 'linux', arch: 'x64', distro: 'ubuntu' });","handlingStrategy":"validation","validationCode":"// Probe the pattern before launching anything\nconst count = await $`aws ec2 describe-images --owners ${owner} --filters Name=name,Values=${name} --query 'length(Images)'`.text();\nif (Number(count) === 0) {\n  throw new Error(`no AMIs match owner=${owner} name=${name} — relax release or pass imageId`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit release (it defaults to '*') when you just need the latest base image","Accept marketplace terms for aws-marketplace owners before using centos images","Prefer explicit imageId pins for reproducible CI machines"],"tags":["aws","ec2","ami","config"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}