Type object
File match amplify.yml amplify.yaml
Schema URL https://catalog.lintel.tools/schemas/schemastore/amplify-yml/latest.json
Source https://www.schemastore.org/amplify.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

version number

Schema version. Use 1 for current specification.

Examples: 1, 0.1
appRoot string

Path within the repository where the application resides (used in monorepo setups)

env object

Environment configuration

1 nested properties
variables Record<string, string>

Key-value pairs of environment variables

backend object

Backend build configuration

1 nested properties
phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

build object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

frontend object

Frontend build configuration

5 nested properties
buildpath string

Path to run install/build from (lowercase variant)

buildPath string

Path to run install/build from (camelCase variant)

phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

build object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

artifacts object

Build output artifacts configuration

3 nested properties
files string[]

Files to include in the build artifact (e.g., '**/*' for all files)

discard-paths boolean | string

Whether to flatten the directory structure of artifacts

baseDirectory string

Directory containing the build output

cache object

Cache configuration for speeding up builds

1 nested properties
paths string[]

Paths to cache between builds (must be relative to project root)

test object

Test build configuration

2 nested properties
phases object

Test phases with preTest, test, and postTest steps

3 nested properties
preTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

test object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

artifacts object

Test output artifacts configuration

3 nested properties
files string[]

Test output files to capture (e.g., screenshots, videos)

configFilePath string

Path to the test report configuration file

baseDirectory string

Directory containing the test output

applications application[]

List of applications for monorepo support

customHeaders customHeaderEntry[]

Custom HTTP response headers (legacy; consider using customHttp.yml instead)

Definitions

version number

Schema version. Use 1 for current specification.

Examples:
  • 1
  • 0.1
appRoot string

Path within the repository where the application resides (used in monorepo setups)

env object

Environment configuration

variables Record<string, string>

Key-value pairs of environment variables

phase object

A build phase containing commands to execute

commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

buildPhases object

Build phases with preBuild, build, and postBuild steps

preBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

build object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

testPhases object

Test phases with preTest, test, and postTest steps

preTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

test object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

frontendArtifacts object

Build output artifacts configuration

files string[]

Files to include in the build artifact (e.g., '**/*' for all files)

discard-paths boolean | string

Whether to flatten the directory structure of artifacts

baseDirectory string

Directory containing the build output

testArtifacts object

Test output artifacts configuration

files string[]

Test output files to capture (e.g., screenshots, videos)

configFilePath string

Path to the test report configuration file

baseDirectory string

Directory containing the test output

cache object

Cache configuration for speeding up builds

paths string[]

Paths to cache between builds (must be relative to project root)

backend object

Backend build configuration

phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

build object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

frontend object

Frontend build configuration

buildpath string

Path to run install/build from (lowercase variant)

buildPath string

Path to run install/build from (camelCase variant)

phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

build object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postBuild object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

artifacts object

Build output artifacts configuration

3 nested properties
files string[]

Files to include in the build artifact (e.g., '**/*' for all files)

discard-paths boolean | string

Whether to flatten the directory structure of artifacts

baseDirectory string

Directory containing the build output

cache object

Cache configuration for speeding up builds

1 nested properties
paths string[]

Paths to cache between builds (must be relative to project root)

test object

Test build configuration

phases object

Test phases with preTest, test, and postTest steps

3 nested properties
preTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

test object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

postTest object

A build phase containing commands to execute

2 nested properties
commands string[]

Shell commands to execute in this phase

runtime-versions Record<string, string | number>

Runtime versions to use (e.g., nodejs: 18)

artifacts object

Test output artifacts configuration

3 nested properties
files string[]

Test output files to capture (e.g., screenshots, videos)

configFilePath string

Path to the test report configuration file

baseDirectory string

Directory containing the test output

customHeaderEntry object

A custom HTTP response header rule

pattern string required

URL path pattern to match

headers object[] required

Headers to apply for matching requests

customHeaders customHeaderEntry[]

Custom HTTP response headers (legacy; consider using customHttp.yml instead)

application object

A single application configuration within a monorepo

appRoot string required

Path within the repository where the application resides (used in monorepo setups)

env object

Environment configuration

1 nested properties
variables Record<string, string>

Key-value pairs of environment variables

backend object

Backend build configuration

1 nested properties
phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

build object

A build phase containing commands to execute

postBuild object

A build phase containing commands to execute

frontend object

Frontend build configuration

5 nested properties
buildpath string

Path to run install/build from (lowercase variant)

buildPath string

Path to run install/build from (camelCase variant)

phases object

Build phases with preBuild, build, and postBuild steps

3 nested properties
preBuild object

A build phase containing commands to execute

build object

A build phase containing commands to execute

postBuild object

A build phase containing commands to execute

artifacts object

Build output artifacts configuration

3 nested properties
files string[]

Files to include in the build artifact (e.g., '**/*' for all files)

discard-paths boolean | string

Whether to flatten the directory structure of artifacts

baseDirectory string

Directory containing the build output

cache object

Cache configuration for speeding up builds

1 nested properties
paths string[]

Paths to cache between builds (must be relative to project root)

test object

Test build configuration

2 nested properties
phases object

Test phases with preTest, test, and postTest steps

3 nested properties
preTest object

A build phase containing commands to execute

test object

A build phase containing commands to execute

postTest object

A build phase containing commands to execute

artifacts object

Test output artifacts configuration

3 nested properties
files string[]

Test output files to capture (e.g., screenshots, videos)

configFilePath string

Path to the test report configuration file

baseDirectory string

Directory containing the test output

customHeaders customHeaderEntry[]

Custom HTTP response headers (legacy; consider using customHttp.yml instead)

Examples

{
  "version": 1,
  "env": {
    "variables": {
      "key": "value"
    }
  },
  "backend": {
    "phases": {
      "preBuild": {
        "commands": [
          "enter command"
        ]
      },
      "build": {
        "commands": [
          "enter command"
        ]
      },
      "postBuild": {
        "commands": [
          "enter command"
        ]
      }
    }
  },
  "frontend": {
    "phases": {
      "preBuild": {
        "commands": [
          "cd react-app",
          "npm ci"
        ]
      },
      "build": {
        "commands": [
          "npm run build"
        ]
      }
    },
    "artifacts": {
      "files": [
        "**/*"
      ],
      "discard-paths": true,
      "baseDirectory": "build"
    },
    "cache": {
      "paths": [
        "node_modules/**/*"
      ]
    }
  },
  "test": {
    "phases": {
      "preTest": {
        "commands": [
          "enter command"
        ]
      },
      "test": {
        "commands": [
          "enter command"
        ]
      },
      "postTest": {
        "commands": [
          "enter command"
        ]
      }
    },
    "artifacts": {
      "files": [
        "location"
      ],
      "configFilePath": "location",
      "baseDirectory": "location"
    }
  }
}
{
  "version": 1,
  "applications": [
    {
      "appRoot": "frontend",
      "frontend": {
        "phases": {
          "preBuild": {
            "commands": [
              "yarn install"
            ]
          },
          "build": {
            "commands": [
              "yarn build"
            ]
          }
        },
        "artifacts": {
          "baseDirectory": "build",
          "files": [
            "**/*"
          ]
        },
        "cache": {
          "paths": [
            "node_modules/**/*"
          ]
        }
      }
    }
  ]
}