POST /apps

Creates a new Amplify app.

Servers

Request headers

Name Type Required Description
X-Amz-Content-Sha256 String No
X-Amz-Credential String No
Content-Type String Yes The media type of the request body.

Default value: "application/json"

X-Amz-Date String No
X-Amz-Algorithm String No
X-Amz-SignedHeaders String No
X-Amz-Security-Token String No
X-Amz-Signature String No

Request body fields

Name Type Required Description
buildSpec String No

The build specification (build spec) file for an Amplify app build.

customHeaders String No

The custom HTTP headers for an Amplify app.

autoBranchCreationConfig Object No

Describes the automated branch creation configuration.

autoBranchCreationConfig.buildSpec String No

The build specification (build spec) for the autocreated branch.

autoBranchCreationConfig.enablePullRequestPreview Boolean No

Enables pull request previews for the autocreated branch.

autoBranchCreationConfig.enablePerformanceMode Boolean No

Enables performance mode for the branch.

Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.

autoBranchCreationConfig.enableBasicAuth Boolean No

Enables basic authorization for the autocreated branch.

autoBranchCreationConfig.pullRequestEnvironmentName String No

The Amplify environment name for the pull request.

autoBranchCreationConfig.stage String No

Describes the current stage for the autocreated branch.

Valid values:

  • "EXPERIMENTAL"
  • "PULL_REQUEST"
  • "DEVELOPMENT"
  • "BETA"
  • "PRODUCTION"
autoBranchCreationConfig.enableAutoBuild Boolean No

Enables auto building for the autocreated branch.

autoBranchCreationConfig.basicAuthCredentials String No

The basic authorization credentials for the autocreated branch. You must base64-encode the authorization credentials and provide them in the format user:password.

autoBranchCreationConfig.framework String No

The framework for the autocreated branch.

description String No

The description for an Amplify app.

iamServiceRoleArn String No

The AWS Identity and Access Management (IAM) service role for an Amplify app.

autoBranchCreationPatterns[] Array No

The automated branch creation glob patterns for an Amplify app.

enableBranchAutoDeletion Boolean No

Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository.

environmentVariables Object No

The environment variables map for an Amplify app.

customRules[] Array No

The custom rewrite and redirect rules for an Amplify app.

customRules[].source String Yes

The source pattern for a URL rewrite or redirect rule.

customRules[].target String Yes

The target pattern for a URL rewrite or redirect rule.

customRules[].condition String No

The condition for a URL rewrite or redirect rule, such as a country code.

customRules[].status String No

The status code for a URL rewrite or redirect rule.

200

Represents a 200 rewrite rule.

301

Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.

302

Represents a 302 temporary redirect rule.

404

Represents a 404 redirect rule.

404-200

Represents a 404 rewrite rule.

enableAutoBranchCreation Boolean No

Enables automated branch creation for an Amplify app.

name String Yes

The name for an Amplify app.

accessToken String No

The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.

Use accessToken for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use oauthToken.

You must specify either accessToken or oauthToken when you create a new app.

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .

enableBasicAuth Boolean No

Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.

platform String No

The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC.

Valid values:

  • "WEB_COMPUTE"
  • "WEB"
  • "WEB_DYNAMIC"
tags Object No

The tag for an Amplify app.

repository String No

The repository for an Amplify app.

oauthToken String No

The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.

Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use accessToken.

You must specify either oauthToken or accessToken when you create a new app.

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide .

enableBranchAutoBuild Boolean No

Enables the auto building of branches for an Amplify app.

basicAuthCredentials String No

The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.