require-aws-amplify-build-commands
Require build.commands in AWS Amplify build specifications.
Targeted pattern scopeâ
build.commandsinamplify.ymloramplify.yaml.
What this rule reportsâ
This rule reports Amplify specs that do not declare explicit build commands.
Why this rule existsâ
Build commands define the deployment artifact pipeline. If they are omitted, build behavior can drift to hidden defaults and become harder to review.
â Incorrectâ
version: 1
frontend:
phases:
build:
cache:
paths:
- node_modules/**/*
â Correctâ
version: 1
frontend:
phases:
build:
commands:
- npm run build
When not to use itâ
Disable this rule if your repository intentionally delegates build execution to external Amplify defaults or wrappers.
Rule catalog ID: R081