

지원 종료 공지: 2025년 9월 15 AWS 일에는 Amazon Lex V1에 대한 지원을 중단할 예정입니다. 2025년 9월 15일 이후에는 Amazon Lex V1 콘솔 또는 Amazon Lex V1 리소스에 더 이상 액세스할 수 없습니다. Amazon Lex V2를 사용하는 경우 대신 [Amazon Lex V2 가이드를](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html) 참조하세요.

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

# 4단계: 봇 생성(AWS CLI)
<a name="gs-cli-create-order-flowers-bot"></a>

`OrderFlowersBot` 봇에는 이전 단계에서 생성한 `OrderFlowers` 의도 하나만 있습니다. 이 연습에서 명령을 실행하려면 명령이 실행될 리전을 알아야 합니다. 리전 목록은 [모델 구축 할당량](gl-limits.md#gl-limits-model-building)을 참조하십시오.

**참고**  
다음 AWS CLI 예제는 Unix, Linux 및 macOS용으로 포맷되어 있습니다. Windows의 경우 `"\$LATEST"`를 `$LATEST`로 변경합니다.

**`OrderFlowersBot` 봇을 생성하려면(AWS CLI)**

1. **OrderFlowersBot.json**라는 이름의 텍스트 파일을 만듭니다. [OrderFlowersBot.json](gs-cli-create-order-flowers-bot-json.md)의 JSON 코드를 텍스트 파일에 복사합니다.

1. 에서 [PutBot](API_PutBot.md) 작업을 AWS CLI호출하여 봇을 생성합니다. 다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

   ```
   aws lex-models put-bot \
       --region region \
       --name OrderFlowersBot \
       --cli-input-json file://OrderFlowersBot.json
   ```

   서버에서 다음과 같이 응답합니다. 봇을 생성하거나 업데이트하는 경우 `status` 필드가 `BUILDING`으로 설정됩니다. 이는 봇이 사용할 준비가 되지 않았음을 나타냅니다. 봇이 사용할 준비가 되었는지 확인하려면 다음 단계에서 [GetBot](API_GetBot.md) 작업을 사용합니다.

   

1. 새 봇이 사용할 준비가 되었는지 확인하려면 다음 명령을 실행합니다. `status` 필드가 `READY`를 반환할 때까지 이 명령을 반복 실행합니다. 다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

   ```
   aws lex-models get-bot \
       --region region \
       --name OrderFlowersBot \
       --version-or-alias "\$LATEST"
   ```

   응답에서 `status` 필드를 찾습니다.

   ```
   {
       "status": "READY", 
       
       ...
       
   }
   ```

## 다음 단계
<a name="gs-create-next-5"></a>

[5단계: 봇 테스트(AWS CLI)](gs-create-test.md)

# OrderFlowersBot.json
<a name="gs-cli-create-order-flowers-bot-json"></a>

다음 코드는 `OrderFlowers` Amazon Lex 봇을 구축하는 데 필요한 JSON 데이터를 제공합니다.

```
{
    "intents": [
        {
            "intentVersion": "$LATEST",
            "intentName": "OrderFlowers"
        }
    ],
    "name": "OrderFlowersBot",
    "locale": "en-US",
    "abortStatement": {
        "messages": [
            {
                "content": "Sorry, I'm not able to assist at this time",
                "contentType": "PlainText"
            }
        ]
    },
    "clarificationPrompt": {
        "maxAttempts": 2,
        "messages": [
            {
                "content": "I didn't understand you, what would you like to do?",
                "contentType": "PlainText"
            }
        ]
    },
    "voiceId": "Salli",
    "childDirected": false,
    "idleSessionTTLInSeconds": 600,
    "description": "Bot to order flowers on the behalf of a user"
}
```