Page updated Dec 5, 2023

Commands

add

Adds a resource for an Amplify category in your local backend

amplify add <category>

<category>

Adds a resource for an Amplify category in your local backend

amplify add <category>

analytics

Add analytics resources to your Amplify project

amplify analytics <subcommand>

add

Takes you through a CLI flow to add an analytics resource to your local backend

amplify analytics add

update

Takes you through steps in the CLI to update an analytics resource

amplify analytics update

push

Provisions only analytics cloud resources with the latest local developments

amplify analytics push

remove

Removes analytics resource from your local backend

amplify analytics remove

console

Opens the web console for the analytics category

amplify analytics console

api

Enable an easy and secure solution to access backend data

amplify api <subcommand>

add-graphql-datasource

Add an RDS datasource to your GraphQL API

amplify api add-graphql-datasource

rebuild

Removes all GraphQL resources and recreates the API (only use in dev envs)

amplify api rebuild

add

Takes you through a CLI flow to add a api resource to your local backend

amplify api add

push

Provisions API cloud resources with the latest local developments

amplify api push

remove

Removes API resource from your local backend

amplify api remove

update

Updates an API resource

amplify api update

gql-compile

Compiles your GraphQL schema and generates a CloudFormation template

amplify api gql-compile

console

Opens the web console for the selected api service

amplify api console

migrate

Migrates GraphQL schemas to the latest GraphQL transformer version

amplify api migrate

override

Generates overrides file to apply custom modifications to CloudFormation

amplify api override

status

Displays the current status of your API

amplify api status

auth

Enable sign-in, sign-up, and sign-out for your app

amplify auth <subcommand>

add

Adds an auth resource to your local backend

amplify auth add

import

Imports an existing auth resource to your local backend

amplify auth import

push

Provisions only auth cloud resources with the latest local developments

amplify auth push

remove

Removes auth resources from your local backend

amplify auth remove

update

Updates the auth resource from your local backend

amplify auth update

console

Opens the web console for the auth category

amplify auth console

build

Builds all resources in the project

amplify build

codegen

Generates GraphQL statements and type annotations

amplify codegen <subcommand>

configure

Configure GraphQL codegen for your Amplify project

amplify codegen configure

statements

Generates GraphQL statements (queries, mutations, and subscriptions)

amplify codegen statements

types

Generates GraphQL type annotations

amplify codegen types

models

Generates GraphQL DataStore models

amplify codegen models

configure

Configure the CLI to work with your AWS profile

amplify configure [subcommand]
FlagDescription
--usage-data-onTurn on usage data sharing.
--usage-data-offTurn off usage data sharing.
--share-project-config-onTurn on non-sensitive project configurations sharing on failures.
--share-project-config-offTurn off non-sensitive project configurations sharing on failures.

project

Configure the attributes of your project

amplify configure project

hosting

Configure hosting resources for your Amplify project

amplify configure hosting

codegen

Configure GraphQL codegen for your Amplify project

amplify configure codegen

console

Opens the web console for the selected cloud resource

amplify console <category>

<category>

Removes a resource for an Amplify category in your local backend

amplify console <category>

delete

Delete the Amplify project

amplify delete [-y | --yes] [-f | --force]
FlagDescription
-y|--yesSkip all interactive prompts by selecting default options
-f|--forceSkip all interactive prompts by selecting default options

diagnose

Capture non-sensitive Amplify backend metadata for debugging purposes

amplify diagnose [--send-report] [--auto-send-off] [--auto-send-on]
FlagDescription
--send-reportShare non-sensitive project configurations of your Amplify backend with the Amplify team
--auto-send-offOpt out of sharing your project configurations with Amplify on failures
--auto-send-onOpt in to sharing your project configurations with Amplify on failures

env

Displays and manages environment related information for your Amplify project

amplify env <subcommand>

add

Adds a new environment to your Amplify Project

amplify env add

checkout <env-name>

Moves your environment to the environment specified in the command

amplify env checkout <env-name>

get

Displays and manages environment related information for your Amplify project

amplify env get

import

Imports an existing Amplify project environment stack to your local backend

amplify env import

list

Displays a list of all the environments in your Amplify project

amplify env list

pull

Pulls your environment with the current cloud environment

amplify env pull

remove

Removes an environment from the Amplify project

amplify env remove

update

Update the environment configuration

amplify env update

export

Export Amplify CLI-generated backend as a Cloud Development Kit (CDK) stack

amplify export [--out <path>]
FlagDescription
--out <path>Specify the output path, where this is typically the path to your CDK project

function

Configure function resources for your Amplify project

amplify function <subcommand>

add

Takes you through a CLI flow to add a function resource to your local backend

amplify function add

update

Takes you through a CLI flow to update an existing function resource

amplify function update

push

Provisions only function cloud resources with the latest local developments

amplify function push

build

Builds all the functions in the project

amplify function build

remove

Removes function resource from your local backend

amplify function remove

console

Opens the web console for the function category

amplify function console

geo

Configure geo resources for your Amplify project

amplify geo <subcommand>

add

Takes you through a CLI flow to add a geo resource to your local backend

amplify geo add

update

Takes you through steps in the CLI to update a geo resource

amplify geo update

push

Provisions only geo cloud resources with the latest local developments

amplify geo push

remove

Removes geo resource from your local backend

amplify geo remove

console

Opens the web console for the geo category

amplify geo console

hosting

Configure hosting resources for your Amplify project

amplify hosting <subcommand>

serve

Opens your deployed site

amplify hosting serve

configure

Configure hosting resources via the Amplify Console

amplify hosting configure

publish

Publishes changes to manually deployed apps

amplify hosting publish

remove

Remove hosting from you app

amplify hosting remove

push

Provisions cloud resources with the latest local changes

amplify hosting push

import

Imports existing resources to your local backend

amplify import <subcommand> [--headless <payload>]
FlagDescription
--headlessHeadless JSON payload

auth

Imports an existing auth resource to your local backend

amplify import auth

env

Imports an existing Amplify project environment stack to your local backend

amplify import env

storage

Imports an existing storage resource to your local backend

amplify import storage

init

Initialize a new Amplify project

amplify init [-y | --yes] [--amplify <payload>] [--envName <env-name>] [--debug] [--frontend <payload>] [--providers <payload>] [--categories <payload>] [--app <git-url>] [--permissions-boundary <ARN>]
FlagDescription
-y|--yesSkip all interactive prompts by selecting default options
--amplifyBasic information of the project
--frontendInformation for the project's frontend application
--envNameName of the environment for the Amplify project
--debugRun the CLI in debug mode
--providersConfiguration settings for provider plugins
--categoriesConfiguration settings for resources in the given categories
--appSpecify a GitHub repository from which to create an Amplify project
--permissions-boundary <ARN>Specify an IAM permissions boundary for the roles created during init

interactions

Configure interactions resources for your Amplify project

amplify interactions <subcommand>

add

Adds a interactions resources to your local backend

amplify interactions add

update

Takes you through a CLI flow to update an interactions resource

amplify interactions update

push

Provisions only interactions cloud resources with the latest local developments

amplify interactions push

remove

Removes interactions resources from your local backend

amplify interactions remove

logout

Logs out of Amplify Studio

amplify logout [--appId <appId>]
FlagDescription
--appId <appId>Specify app ID

mock

Run mock server for testing categories locally

amplify mock [subcommand]

api

Run mock server for testing API locally

amplify mock api

storage

Run mock server for testing storage locally

amplify mock storage

function

Run mock server for testing functions locally

amplify mock function

function <function-name>

Run mock server for testing a specific function locally

amplify mock function <function-name>

notifications

Configure notifications for your Amplify project

amplify notifications

add

Adds a notification channel

amplify notifications add

remove

Removes a notification channel

amplify notifications remove

update

Updates the configuration of a notification channel

amplify notifications update

status

Lists the enabled/disabled statuses of the available notification channels

amplify notifications status

console

Opens the Amazon Pinpoint console displaying the current channel settings

amplify notifications console

push

Provisions cloud resources with the latest local changes

amplify notifications push

override

Override Amplify-generated resources with Cloud Development Kit (CDK)

amplify override <subcommand>

api

Override Amplify-generated GraphQL API resources

amplify override api

auth

Override Amplify-generated auth resources

amplify override auth

storage

Override Amplify-generated storage resources

amplify override storage

project

override Amplify-generated project-level resources, such as IAM roles

amplify override project

plugin

Configure Amplify plugins

amplify plugin <subcommand>

init

Scaffolds a skeleton Amplify CLI plugin

amplify plugin init

configure

Configures Amplify CLI plugin options

amplify plugin configure

list

Lists general plugin information

amplify plugin list

scan

Explicitly starts a scan/search for new and existing plugins

amplify plugin scan

add

Explicitly adds a plugin for the Amplify CLI to use

amplify plugin add

remove

Explicitly removes a plugin from the Amplify CLI

amplify plugin remove

verify

Verifies if a plugin package/directory is a valid Amplify CLI plugin

amplify plugin verify

predictions

Configure predictions resources for your Amplify project

amplify predictions <subcommand>

add

Takes you through a CLI flow to add a predictions resource to your local backend

amplify predictions add

remove

Removes predictions resource from your local backend

amplify predictions remove

update

Takes you through steps in the CLI to update an predictions resource

amplify predictions update

console

Opens a web console to view your predictions resource

amplify predictions console

push

Provisions cloud resources with the latest local changes

amplify predictions push

publish

Executes amplify push and hosts the frontend app

amplify publish [-y | --yes] [--codegen] [-f | --force] [--allow-destructive-graphql-schema-updates] [-c | --invalidateCloudFront]
FlagDescription
-y|--yesAutomatically accept publish prompt
--codegenConfiguration for GraphQL codegen
-f|--forcePushes all resources regardless of update status and bypasses all guardrails
--allow-destructive-graphql-schema-updatesPushes schema changes that require removal or replacement of underlying tables
-c|--invalidateCloudFrontSend an invalidation request to the Amazon CloudFront service

pull

Fetch upstream backend changes from the cloud and updates the local environment

amplify pull [--appId <app-id>] [--envName <env-name>] [--debug] [-y | --yes] [--restore] [--amplify <payload>] [--frontend <payload>] [--providers <payload>] [--categories <payload>]
FlagDescription
--appId <app-id>The unique identifier for the Amplify project
--envName <env-name>Name of the environment for the Amplify project
--debugRun the CLI in debug mode
-y|--yesSkip all interactive prompts by selecting default options
--restoreOverwrite your local backend changes with configurations from the cloud
--amplifyBasic information of the project
--frontendInformation for the project's frontend application
--providersConfiguration settings for provider plugins

push

Provisions cloud resources with the latest local changes

amplify push [category] [--codegen] [--debug] [-f | --force] [-y | --yes] [--allow-destructive-graphql-schema-updates]
FlagDescription
--codegenConfiguration for GraphQL codegen
--debugRun the CLI in debug mode
-f|--forcePushes all resources regardless of update status and bypasses all guardrails
-y|--yesSkip all interactive prompts by selecting default options
--allow-destructive-graphql-schema-updatesPushes schema changes that require removal or replacement of underlying tables

[category]

Provisions cloud resources with the latest local changes for a single category

amplify push [category]

remove

Removes a resource for an Amplify category in your local backend

amplify remove <category>

<category>

Removes a resource for an Amplify category in your local backend

amplify remove <category>

serve

Executes amplify push, and then test run the client-side application locally

amplify serve

status

Shows the state of local resources not yet pushed to the cloud

amplify status [-v | --verbose]
FlagDescription
-v|--verboseShows verbose details, including cloudformation differences

notifications

Lists the enabled/disabled statuses of the available notification channels

amplify status notifications

api

Displays the current status of your API

amplify status api

auth

Displays the current status of your auth resource

amplify status auth

custom

Displays the current status of your custom resource

amplify status custom

storage

Displays the current status of your storage resource

amplify status storage

analytics

Displays the current status of your analytics resource

amplify status analytics

function

Displays the current status of your function resource

amplify status function

hosting

Displays the current status of your hosting

amplify status hosting

interactions

Displays the current status of your interactions resource

amplify status interactions

predictions

Displays the current status of your predictions resource

amplify status predictions

storage

Enable a mechanism for managing user content

amplify storage <subcommand>

add

Adds a storage resource to your local backend

amplify storage add

import

Import an existing storage resource to your local backend

amplify storage import

update

Update a storage resource

amplify storage update

push

Provisions storage cloud resources with the latest local developments

amplify storage push

remove

Removes storage resource from your local backend

amplify storage remove

override

Generates 'overrides.ts' for overriding storage resources

amplify storage override

console

Opens the web console for the storage category

amplify storage console

uninstall

Uninstall the Amplify CLI

amplify uninstall

update

Update resource for an Amplify category in your local backend

amplify update <category>

<category>

Update resource for an Amplify category in your local backend

amplify update <category>

upgrade

Download and install the latest version of the Amplify CLI

amplify upgrade