

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 에서 애플리케이션을 위한 환경 생성 AWS AppConfig
<a name="appconfig-creating-environment"></a>

각 AWS AppConfig 애플리케이션에 대해 하나 이상의 환경을 정의합니다. 환경은 `Beta` 또는 `Production` 환경, AWS Lambda 함수 또는 컨테이너의 애플리케이션과 같은 AppConfig 대상의 논리적 배포 그룹입니다. 애플리케이션 하위 구성 요소(예: `Web`, `Mobile` 및 `Back-end`)에 대한 환경을 정의할 수도 있습니다. 각 환경에 대해 Amazon CloudWatch 경보를 구성할 수 있습니다. 시스템은 구성 배포 중에 경보를 모니터링합니다. 경보가 트리거되면 시스템이 구성을 롤백합니다.

**시작하기 전**  
 AWS AppConfig 가 CloudWatch 경보에 대한 응답으로 구성을 롤백하도록 하려면가 CloudWatch 경보 AWS AppConfig 에 응답할 수 있는 권한을 가진 AWS Identity and Access Management (IAM) 역할을 구성해야 합니다. 다음 절차에서 이 역할을 선택합니다. 자세한 내용은 [자동 롤백에 대한 권한 구성](setting-up-appconfig.md#getting-started-with-appconfig-cloudwatch-alarms-permissions) 단원을 참조하십시오.

**Topics**
+ [AWS AppConfig 환경 생성(콘솔)](#appconfig-creating-environment-console)
+ [AWS AppConfig 환경 생성(명령줄)](#appconfig-creating-environment-commandline)

## AWS AppConfig 환경 생성(콘솔)
<a name="appconfig-creating-environment-console"></a>

다음 절차에 따라 콘솔을 사용하여 AWS AppConfig AWS Systems Manager 환경을 생성합니다.

**환경을 생성하는 방법**

1. [https://console.aws.amazon.com/systems-manager/appconfig/](https://console.aws.amazon.com/systems-manager/appconfig/) AWS Systems Manager 콘솔을 엽니다.

1. 탐색 창에서 **애플리케이션**을 선택한 다음 애플리케이션 이름을 선택하여 세부 정보 페이지를 엽니다.

1. **환경** 탭을 선택하고 **환경 생성**을 선택합니다.

1. **이름**에 환경의 이름을 입력합니다.

1. **설명**에 환경에 대한 설명을 입력합니다.

1. (선택 사항) **모니터** 섹션에서 **IAM 역할** 필드를 선택한 다음, 경보를 모니터링하려는 지표에 대해 `cloudwatch:DescribeAlarms`를 직접 호출할 권한이 있는 IAM 역할을 선택합니다.

1. **CloudWatch 경보** 목록에서 모니터링할 Amazon 리소스 이름(ARNs) 하나 이상의 지표를 입력합니다. 이러한 지표 중 하나가 `ALARM` 상태가 되면가 구성 배포를 AWS AppConfig 롤백합니다. 권장 지표에 대한 자세한 내용은 [배포의 자동 롤백 모니터링](monitoring-deployments.md) 단원을 참조하세요.

1. (선택 사항) **확장 연결** 섹션의 목록에서 확장을 선택합니다. 자세한 내용은 [AWS AppConfig 확장 이해](working-with-appconfig-extensions-about.md) 단원을 참조하십시오.

1. (선택 사항) **태그** 섹션에 키와 선택적 값을 입력합니다. 하나의 리소스에 대해 최대 50개의 태그를 지정할 수 있습니다.

1. **환경 생성**을 선택합니다.

AWS AppConfig 는 환경을 생성한 다음 **환경 세부 정보** 페이지를 표시합니다. [에서 구성 프로필 생성 AWS AppConfig](appconfig-creating-configuration-profile.md)로 이동합니다.

## AWS AppConfig 환경 생성(명령줄)
<a name="appconfig-creating-environment-commandline"></a>

다음 절차에서는 AWS CLI (Linux 또는 Windows) 또는를 사용하여 AWS AppConfig 환경을 AWS Tools for PowerShell 생성하는 방법을 설명합니다.

**단계별로 환경을 생성하려면**

1. 를 엽니다 AWS CLI.

1. 다음 명령을 실행해 환경을 생성합니다.

------
#### [ Linux ]

   ```
   aws appconfig create-environment \
     --application-id The_application_ID \
     --name A_name_for_the_environment \
     --description A_description_of_the_environment \
     --monitors "AlarmArn=ARN_of_the_Amazon_CloudWatch_alarm,AlarmArnRole=ARN_of_the_IAM role_for_AWS AppConfig_to_monitor_AlarmArn" \
     --tags User_defined_key_value_pair_metadata_of_the_environment
   ```

------
#### [ Windows ]

   ```
   aws appconfig create-environment ^
     --application-id The_application_ID ^
     --name A_name_for_the_environment ^
     --description A_description_of_the_environment ^
     --monitors "AlarmArn=ARN_of_the_Amazon_CloudWatch_alarm,AlarmArnRole=ARN_of_the_IAM role_for_AWS AppConfig_to_monitor_AlarmArn" ^
     --tags User_defined_key_value_pair_metadata_of_the_environment
   ```

------
#### [ PowerShell ]

   ```
   New-APPCEnvironment `
     -Name Name_for_the_environment `
     -ApplicationId The_application_ID
     -Description Description_of_the_environment `
     -Monitors @{"AlarmArn=ARN_of_the_Amazon_CloudWatch_alarm,AlarmArnRole=ARN_of_the_IAM role_for_AWS AppConfig_to_monitor_AlarmArn"} `
     -Tag Hashtable_type_user_defined_key_value_pair_metadata_of_the_environment
   ```

------

   시스템은 다음과 같은 정보를 반환합니다.

------
#### [ Linux ]

   ```
   {
      "ApplicationId": "The application ID",
      "Id": "The_environment ID",
      "Name": "Name of the environment",
      "State": "The state of the environment",
      "Description": "Description of the environment",
      
      "Monitors": [ 
         { 
            "AlarmArn": "ARN of the Amazon CloudWatch alarm",
            "AlarmRoleArn": "ARN of the IAM role for AppConfig to monitor AlarmArn"
         }
      ]  
   }
   ```

------
#### [ Windows ]

   ```
   {
      "ApplicationId": "The application ID",
      "Id": "The environment ID",
      "Name": "Name of the environment",
      "State": "The state of the environment"
      "Description": "Description of the environment",
      
      "Monitors": [ 
         { 
            "AlarmArn": "ARN of the Amazon CloudWatch alarm",
            "AlarmRoleArn": "ARN of the IAM role for AppConfig to monitor AlarmArn"
         }
      ] 
   }
   ```

------
#### [ PowerShell ]

   ```
   ApplicationId     : The application ID
   ContentLength     : Runtime of the command
   Description       : Description of the environment
   HttpStatusCode    : HTTP Status of the runtime
   Id                : The environment ID
   Monitors          : {ARN of the Amazon CloudWatch alarm, ARN of the IAM role for AppConfig to monitor AlarmArn}
   Name              : Name of the environment
   Response Metadata : Runtime Metadata
   State             : State of the environment
   ```

------

[에서 구성 프로필 생성 AWS AppConfig](appconfig-creating-configuration-profile.md)로 이동합니다.