---
title: "POST /applications/{ApplicationId}/environments"
method: POST
path: "/applications/{ApplicationId}/environments"
---

# POST /applications/{ApplicationId}/environments

`POST /applications/{ApplicationId}/environments`

Creates an environment. For each application, you define one or more environments. An environment is a deployment group of AppConfig targets, such as applications in a <code>Beta</code> or <code>Production</code> environment. You can also define environments for application subcomponents such as the <code>Web</code>, <code>Mobile</code> and <code>Back-end</code> components for your application. You can configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls back the configuration.

## Path parameters

- `ApplicationId` string, required

## Request body

- object
  - `Name` string, required — A name for the environment.
  - `Description` string — A description of the environment.
  - `Monitors` Monitor[] — Amazon CloudWatch alarms to monitor during the deployment process.
    - `AlarmArn` string, required — Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.
    - `AlarmRoleArn` string — ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.
  - `Tags` object — Metadata to assign to the environment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

## Response `201`

Success

- Environment
  - `ApplicationId` string — The application ID.
  - `Id` string — The environment ID.
  - `Name` string — The name of the environment.
  - `Description` string — The description of the environment.
  - `State` 'READY_FOR_DEPLOYMENT' | 'DEPLOYING' | 'ROLLING_BACK' | 'ROLLED_BACK' — The state of the environment. An environment can be in one of the following states: <code>READY_FOR_DEPLOYMENT</code>, <code>DEPLOYING</code>, <code>ROLLING_BACK</code>, or <code>ROLLED_BACK</code>
  - `Monitors` Monitor[] — Amazon CloudWatch alarms monitored during the deployment.
    - `AlarmArn` string, required — Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.
    - `AlarmRoleArn` string — ARN of an Identity and Access Management (IAM) role for AppConfig to monitor <code>AlarmArn</code>.

## Other responses

- `480` — InternalServerException
- `481` — ResourceNotFoundException
- `482` — BadRequestException

---

[API](https://skmtc.net/aws/apis/appconfig.md) · [All operations](https://skmtc.net/aws/apis/appconfig/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/appconfig/versions/924584438718/schema)
