LinuxCommandLibrary

aws-amplify

Manage cloud-powered mobile and web applications

TLDR

Create a new Amplify app

$ aws amplify create-app --name [app_name] --description [description] --repository [repo_url] --platform [platform] --environment-variables [env_vars] --tags [tags]
copy

Delete an existing Amplify app
$ aws amplify delete-app --app-id [app_id]
copy

Get details of a specific Amplify app
$ aws amplify get-app --app-id [app_id]
copy

List all Amplify apps
$ aws amplify list-apps
copy

Update settings of an Amplify app
$ aws amplify update-app --app-id [app_id] --name [new_name] --description [new_description] --repository [new_repo_url] --environment-variables [new_env_vars] --tags [new_tags]
copy

Add a new backend environment to an Amplify app
$ aws amplify create-backend-environment --app-id [app_id] --environment-name [env_name] --deployment-artifacts [artifacts]
copy

Remove a backend environment from an Amplify app
$ aws amplify delete-backend-environment --app-id [app_id] --environment-name [env_name]
copy

List all backend environments in an Amplify app
$ aws amplify list-backend-environments --app-id [app_id]
copy

SYNOPSIS

amplify [] []
The amplify CLI operates by specifying a primary command, often followed by a subcommand that defines the specific action to be performed on your Amplify project.

PARAMETERS

init
    Initializes a new Amplify project in your local directory and guides you through setting up AWS backend resources.

add
    Adds a new cloud service category (e.g., Auth, API, Storage, Hosting) to your project, prompting for configuration details.

push
    Deploys local backend changes (added or modified categories) to the AWS cloud, provisioning or updating resources.

pull
    Pulls the latest backend environment changes from the cloud to your local project, updating configurations and resource definitions.

status
    Displays the current status of your local and cloud backend resources, highlighting pending changes.

delete
    Deletes the entire Amplify project and all associated cloud resources. This action is irreversible.

console
    Opens the AWS Amplify Console for the current project in your default web browser, providing a GUI for managing your application.

configure
    Configures a new or existing AWS profile for the Amplify CLI, allowing you to link your CLI to an AWS account.

help []
    Displays help information for the amplify command or a specific subcommand (e.g., amplify help add).

DESCRIPTION

The AWS Amplify CLI (amplify) is a command-line toolchain designed to help developers build, configure, and deploy scalable mobile and web applications powered by Amazon Web Services. It simplifies the process of integrating cloud services like authentication, data storage, APIs, and hosting into front-end applications.

The CLI provides a guided workflow to provision and manage AWS backend resources directly from the developer's local environment, syncing changes to the cloud. It supports popular JavaScript frameworks such as React, Angular, Vue, and Next.js, as well as mobile platforms, enabling rapid full-stack serverless development. Developers can add various 'categories' of cloud services, manage multiple deployment environments, and automate their development workflow.

CAVEATS

The amplify command is not a native Linux utility; it requires Node.js and npm/yarn for installation and execution. Operations like amplify push and amplify delete directly provision, modify, or remove cloud resources in your AWS account, incurring costs and potentially irreversible data loss; always use with caution. It also requires an active AWS account and configured AWS credentials to interact with cloud services.

INSTALLATION

The amplify CLI is typically installed globally using Node.js package managers:
npm install -g @aws-amplify/cli
or
yarn global add @aws-amplify/cli
Prior to installation, ensure Node.js (LTS version recommended) and npm/yarn are installed on your system.

CORE CONCEPTS

Amplify projects are structured around 'categories' (e.g., Auth, API, Storage, Analytics) which represent different AWS backend services. Developers can manage multiple 'environments' (e.g., dev, staging, prod) within a single project, allowing for isolated development and deployment stages.

HISTORY

AWS Amplify was launched in 2017 as a framework and toolchain aimed at simplifying full-stack serverless application development for front-end developers. The Amplify CLI has continuously evolved alongside the AWS Amplify framework, adding support for new AWS services, front-end frameworks, and development workflows. It has become a cornerstone for building scalable and secure web and mobile applications on AWS by abstracting away much of the complexity of direct AWS service integration.

SEE ALSO

npm(1), yarn(1), aws(1), node(1)

Copied to clipboard