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

aws-amplify [global-options...] <subcommand> [<args>...]

PARAMETERS

--help
    Display help information

--version
    Output version number

--debug
    Enable debug logging

--prompt
    Force interactive prompts

-a --appId <ID>
    Specify Amplify app ID

-e --env <NAME>
    Set environment name

-c --config <FILE>
    Custom config file path

--frontend-framework <FRAMEWORK>
    Specify frontend framework

DESCRIPTION

aws-amplify is the command-line interface for the AWS Amplify framework, enabling developers to build, deploy, and manage scalable fullstack web and mobile applications on AWS. It automates provisioning of backend services like authentication (Cognito), GraphQL/REST APIs (AppSync), storage (S3), functions (Lambda), and hosting (Amplify Hosting).

Workflow starts with init to set up a project, followed by add for features, push to deploy, and CI/CD integration with Git providers. Supports multiple environments, TypeScript backends (Gen 2), and frontend frameworks like React, Angular, Vue, Next.js, Flutter, and Swift.

Key benefits include guided category selection, local mocking/testing, conflict detection, and console access. It abstracts AWS complexity, speeding development from prototype to production.

CAVEATS

Requires Node.js v18+, npm, and AWS credentials. Run aws-amplify configure first. Git repo needed for some ops. Backend-only mode limits frontend integration.

CORE SUBCOMMANDS

init: Initialize project.
status: Show backend status.
add <category>: Add feature (auth, api, storage, function, hosting).
push: Deploy backend.
pull: Update local from cloud.
delete: Remove backend.
publish: Build/deploy frontend.
console: Open Amplify Console.

INSTALLATION

npm install -g @aws-amplify/cli
brew install aws/tap/amplify
curl script for Linux/macOS.

HISTORY

Launched by AWS in July 2018. Reached v1 in 2019 with multi-env support. v5 (2021) added Android/iOS. v10+ (2023) introduced Gen 2 with Nix-based CDK for TypeScript backends.

SEE ALSO

aws(1), npm(1), git(1)

Copied to clipboard