

# 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](https://docs.aws.amazon.com/amplify/hosting/userguide/welcome.html).

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
<a name="_view_your_build_logs_in_the_console"></a>

1. Sign in to the Amplify console.

1. Choose an app.

1. In the left navigation pane, choose **Deployments**.

1. Choose your deployment.

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

## View your build logs using the CLI
<a name="_view_your_build_logs_using_the_cli"></a>

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.

```bash
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:

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

## View a deployment’s migrations in its build log
<a name="deploy-your-app-build-logs-migrations"></a>

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:

```bash
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](monitoring-database-logs.md).