[ aws . amplifygen3 ]

create

Description

Initialize a new Amplify app by resolving an app name, validating AWS credentials, provisioning cloud resources (IAM roles, app creation), and writing an amplify.jsonc configuration file.

Synopsis

  create
[--name <value>]
[--git <value>]
[--git-owner <value>]
[--git-branch <value>]
[--config <value>]
[--filter <value>]
[--role-permissions-mode <value>]
[--yes]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]

Options

--name (string) Custom app name. Takes precedence over the name in amplify.jsonc, package.json, and the current directory name.

--git (string) Use a git repository as the asset source. Pass “.” to infer the URL from the local git remotes, or pass an explicit URL. SSH URLs are normalized to HTTPS automatically.

--git-owner (string) GitLab account that owns the repository passed to –git. Needed only when multiple GitLab accounts are connected and the command can’t prompt (e.g., CI=true); otherwise Amplify asks interactively. Ignored for GitHub repositories.

--git-branch (string) Production branch of the repository passed to –git. Pushes to this branch deploy to the production environment, and pushes to other branches deploy to the preview environment. A single branch name, not a pattern. Defaults to the repository’s default branch, or main if it can’t be read.

--config (string) Path to the configuration file. Defaults to amplify.jsonc in the current directory.

--filter (string) Create the app from a subdirectory of a monorepo. Later builds and deploys run from that subdirectory, while npm/yarn still resolve dependencies from the workspace root.

--role-permissions-mode (string) How much of its IAM role your app can use: ‘scoped’ (the default) or ‘full’. ‘scoped’ limits the role to what the app’s integrations need. ‘full’ gives the app every permission attached to the role; use it for custom integrations, or when the scoped policy would be longer than the 2,048-character limit AWS sets for it.

--yes (boolean) Install the framework adapter without asking. Nuxt, Astro and SvelteKit need an adapter package before the build can write its output directory, and create offers to install it. Pass this to accept up front, which is the only way to accept in a headless (CI=true) session, where there is no prompt to answer; without it a headless run prints the steps instead. Setting the adapter in the framework config is printed either way, to do by hand. No effect for Next.js, whose adapter is the build command. Shorthand: -y.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

--help (boolean)

Display help for the command/subcommand.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

To create an app

The following create example registers a new Amplify app from the current directory. The command resolves the app name, validates your credentials, provisions the IAM roles the service needs, registers the app, and writes an amplify.jsonc configuration file beside your project. It also creates the two built-in environments, preview and production.

No website URL exists yet; one is created by the first deployment.

create is an alias for aws amplifygen3 app create.

aws amplifygen3 create \
    --name my-app

Output:

App 'my-app' created successfully.

Configuration file created:
    /home/user/my-app/amplify.jsonc

Website URL will be created after the first deployment.

Environments created:
  - preview  (default)
  - production

Next:
  Deploy to preview:
    aws amplifygen3 deploy
  Deploy to production:
    aws amplifygen3 deploy -e production
  Change app settings (build commands, WAF):
    aws amplifygen3 app edit

Using an AI coding agent? Install the Amplify Gen 3 skill so the agent knows the Gen 3 commands and config:
    aws agent-toolkit add-skill --skill-name aws-amplify

For a Next.js, Nuxt, Astro, SvelteKit or Remix project, amplify.jsonc sets output_directory to .amplify, the folder the framework adapter builds into. The command then also adds /.amplify/ to the .gitignore beside amplify.jsonc, creating the file if there is none, so a local build is not committed. The output says so after the configuration file: Added /.amplify/ to .gitignore (build output). If a line in that .gitignore already ignores the folder, or un-ignores something in it, the file is left as it is.

Remix, TanStack Start, SolidStart and Analog have no adapter of their own, so their server is packaged by @aws-amplifygen3/adapter-nodejs, which the command offers to install. A Remix project also needs a server.mjs, whose contents the command prints, and TanStack Start and SolidStart need the Nitro plugin in their Vite config. For TanStack Start and SolidStart, output_directory is .output/.amplify, and for Analog it is dist/analog/.amplify: the adapter writes its output inside the folder their framework builds into, which their own .gitignore already lists. A React Router project that renders on the server cannot be deployed yet: the command warns, and says to set ssr: false to deploy it as a single-page app.

A project whose own configuration makes it a static site needs no framework adapter. Its framework builds the whole site into one folder, and amplify.jsonc sets output_directory to that folder:

  • Next.js with output: 'export' in next.config: out, or its distDir.
  • Nuxt with ssr: false in nuxt.config: .output/public, built by the generate script.
  • Astro with no adapter and no page rendered on demand: dist, or its outDir.
  • SvelteKit with @sveltejs/adapter-static: build, or the adapter’s pages.
  • Remix with ssr: false in the Remix Vite plugin: build/client.
  • Analog with static: true in the Analog Vite plugin: dist/analog/public.
  • React Router with ssr: false in react-router.config: build/client.
  • TanStack Start without the Nitro plugin, with prerender turned on in tanstackStart()’s options, or its single-page shell written to /index: dist/client.

For these, the command does not offer to install an adapter and does not change .gitignore. If the configuration sets one of these options in a way the command cannot read, such as a value computed in code, the project keeps the adapter build.

If you omit --name, the command derives the app name from amplify.jsonc, then from the name field in package.json, then from the current directory name.