View a markdown version of this page

View your build logs - AWS Amplify

View your build logs

Welcome to the new AWS Amplify

Amplify now puts hosting, a Postgres database, and sign-in in one AWS account. Deploy from your terminal or from Git, check every change in a preview first, and roll back in one step if something breaks.

Looking for Amplify Hosting? See the Amplify Hosting User Guide.

As your app deploys, you can view the build logs. The logs can help you troubleshoot failed builds or confirm that the build process is progressing successfully.

View your build logs in the console

  1. Sign in to the Amplify console.

  2. Choose an app.

  3. In the left navigation pane, choose Deployments.

  4. Choose your deployment.

  5. On the deployment page, view the build logs. To troubleshoot further, you can download the build logs.

View your build logs using the CLI

The following AWS CLI command prints the build logs for a specific deployment. Replace <deployment-id> with the ID of your deployment. You can also add --env <environment> to specify the environment.

aws amplifygen3 logs get \ --log-type build \ --deployment-id <deployment-id>

The deployment log and the build log are the same log. --log-type deployment returns the same lines, because build is an alias for deployment.

When a deployment fails, aws amplifygen3 deploy prints the logs get command to run. The following AWS CLI command also prints it:

aws amplifygen3 deployment get --id <deployment-id>

View a deployment’s migrations in its build log

If your app has a backend, each deployment runs your new migrations before the build. If a migration fails, the build doesn’t start, and the deployment fails with MIGRATION_FAILED. The build log shows you which migration failed and why.

The following AWS CLI command shows a deployment’s migrations and its build together, in time order. Replace <deployment-id> with the ID that aws amplifygen3 deploy printed:

aws amplifygen3 logs get --log-type build --deployment-id <deployment-id>

After its timestamp, each migration line has [migrate]. Build lines have no tag. A deployment that applies no new migrations has no [migrate] lines. If the migrations run and the build then fails, you see [migrate] lines followed by build lines.

The output of aws amplifygen3 deployment get --id <deployment-id> also has a Migrations block. The block shows the status of the migration step and the names of the migrations that the deployment applied and skipped.

For the database log lines of a failed migration, see Database logs.