CodeBuild buildspec.yml Validator - Static Checker for Phases, Env, Artifacts and Reports
First Published:
Last Updated:
buildspec.yml static validator. Checks version, phase order, runtime versions, environment variables, artifacts, reports, cache and shell variable references entirely in your browser.All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your buildspec never leaves your device.
- This tool is provided "AS IS" without any warranties of any kind.
- The author accepts no responsibility for build failures, pipeline misconfiguration, or any other issues arising from the use of this tool.
- This validator performs static checks only and cannot guarantee that your buildspec will run successfully in an actual CodeBuild environment.
- Always keep backups of your original buildspec files.
- By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Drop a .yml or .yaml file here, or click to select.
The file is read locally and never uploaded.
Features
- Static Validation: Parses
buildspec.ymlwith js-yaml and applies CodeBuild-specific rules without any AWS access. - Phase Order Detection: Flags out-of-order phases (
install→pre_build→build→post_build). - Environment Variable Checks: Validates
env.variables,parameter-store,secrets-manager, andexported-variablesshapes. - Artifacts & Reports: Verifies
artifacts.files,base-directoryhints, andreports.<name>.file-formatvalues (JUNIT_XML / CUCUMBERJSON / VISUALSTUDIOTRX / TESTNGXML / CLOVERXML). - Shell Syntax Hints: Flags undeclared
${VAR}/$VARreferences, pipes withoutset -o pipefail, and backtick command substitution in favor of$(...). - Runtime Version Hints: Flags uncommon runtime versions and
runtime-versionsplaced outsideinstall. - Presets: Four sample buildspecs (Node.js / Python / Docker / composite) for quick exploration.
- Client-Side Only: No network calls, works offline once the page is loaded.
How to Use
- Paste your
buildspec.ymlin the textarea, or switch to the Upload File tab and drop a.yml/.yamlfile. - Optionally pick a Sample buildspec to see a working example.
- Click Validate. The summary shows the count of errors, warnings, and informational notes.
- Review each issue in the list. The
pathlocator identifies the offending key (for examplephases.build.commands). - Use Copy Report or Download Report to capture the findings as plain text.
Important Notes
- Static checks cannot replace an actual CodeBuild run. They catch common structural mistakes but not runtime behavior (permissions, network, container image, etc.).
- The list of valid runtime-versions values evolves over time. The tool hints at common values but does not block uncommon ones.
post_buildcommands run even whenbuildfails. Keep them idempotent or branch on$CODEBUILD_BUILD_SUCCEEDING.- Batch builds (
batch:) are recognized as a permitted top-level key but not validated in depth in this MVP. - This tool does not expand CodeBuild environment variables or parameter-store values at validation time.
Third-Party Libraries:
- js-yaml (v4.1.0) - License: MIT (Vitaly Puzrin) - https://github.com/nodeca/js-yaml
References:
Tech Blog with curated related content
Web Tools Collection
Written by Hidekazu Konishi