

# Create a custom environment

**Welcome to the new AWS Amplify**  
Amplify now puts hosting, a Postgres database, and sign-in in one AWS account. Deploy from your terminal or from Git, check every change in a preview first, and roll back in one step if something breaks.  
Looking for Amplify Hosting? See the [Amplify Hosting User Guide](https://docs.aws.amazon.com/amplify/hosting/userguide/welcome.html).

In addition to the production and preview environments, you can create your own pre-production environments. Custom environments let you add stages like staging or QA to your workflow.

To control for which Git branches that you want Amplify to release, configure the branch tracking.

The following are example branch tracking rules:
+  `*` - All branches
+  `!main` - All branches except `main` 
+  `feature/*` - All branches that start with `feature/`. This could include `feature/auth` or `feature/a` 

## Create a custom environment in the console
<a name="_create_a_custom_environment_in_the_console"></a>

1. Sign into the Amplify console at https://us-east-2.console.aws.amazon.com/amplifygen3/home.

1. Choose an app.

1. In the left navigation pane, choose **Settings**.

1. For **Environments**, choose **Create environment**.

1. For **Environment name**, enter a name. The name must be 1–40 characters, use lowercase letters, and can’t be `production` or `preview`, which are reserved.

1. For the environment’s role, choose a new or existing IAM role for the environment to use.

1. (Optional) If your app is connected to GitHub or GitLab, for **Branch tracking**, do the following:

   1. Choose a condition for automatic deployments.

   1. Choose **Add rule** to create a new condition for automatic deployments.

1. Choose **Create**.

## Create a custom environment using the CLI
<a name="_create_a_custom_environment_using_the_cli"></a>

The following CLI command creates a custom environment.

```bash
aws amplifygen3 env create --name staging
```