

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

# 사용자 지정 모델 온디맨드 추론용 배포
<a name="deploy-custom-model-on-demand"></a>

 모델 사용자 지정 작업을 사용하여 사용자 지정 모델을 생성하거나 SageMaker AI 훈련 사용자 지정 Amazon Nova 모델을 가져온 후 모델에 대한 온디맨드 추론을 설정할 수 있습니다. 온디맨드 추론을 사용하면 사용한 만큼만 비용을 지불하고 프로비저닝된 컴퓨팅 리소스를 설정할 필요가 없습니다.

사용자 지정 모델의 온디맨드 추론을 설정하려면 사용자 지정 모델 배포를 통해 배포해야 합니다. 사용자 지정 모델을 배포한 후 프롬프트를 제출하고 모델 추론을 통해 응답을 생성할 때 배포의 Amazon 리소스 이름(ARN)을 `modelId` 파라미터로 사용합니다.

 온디맨드 추론 가격 책정에 대한 자세한 내용은 [Amazon Bedrock 가격 책정](https://aws.amazon.com/bedrock/pricing)을 참조하세요. 다음 리전에서 온디맨드 추론을 위한 사용자 지정 모델을 배포할 수 있습니다(Amazon Bedrock에서 지원되는 리전에 대한 자세한 내용은 [Amazon Bedrock 엔드포인트 및 할당량](https://docs.aws.amazon.com/general/latest/gr/bedrock.html) 참조).
+ 미국 동부(버지니아 북부)
+ 미국 서부(오레곤)

## 온디맨드 추론을 위해 사용자 지정 모델을 배포하기 위한 사전 조건
<a name="custom-model-inference-prerequisites"></a>

온디맨드 추론을 위한 사용자 지정 모델을 배포하려면 먼저 다음 요구 사항을 충족해야 합니다.
+ 미국 동부(버지니아 북부) 또는 미국 서부(오리건) 리전을 사용해야 합니다.
+ 2025년 7월 16일 당일 또는 이후에 모델을 사용자 지정해야 합니다. 지원되는 모델은 [지원되는 기본 모델](#custom-model-inference-supported-models) 섹션을 참조하세요.
+ 계정에는 배포 중인 모델에 액세스할 수 있는 권한이 있어야 합니다. 모델 사용자 지정 액세스 및 보안에 대한 자세한 내용은 [모델 사용자 지정 액세스 및 보안](custom-model-job-access-security.md) 섹션을 참조하세요.
+ 모델이 AWS KMS 키로 암호화된 경우 해당 키를 사용할 권한이 있어야 합니다. 자세한 내용은 [사용자 지정 모델 암호화](encryption-custom-job.md) 단원을 참조하십시오.

## 지원되는 기본 모델
<a name="custom-model-inference-supported-models"></a>

다음 기본 모델에 대해 온디맨드 추론을 설정할 수 있습니다.
+ Amazon Nova Lite - 지원되는 리전: 미국 동부(버지니아 북부)
+ Amazon Nova 2 Lite - 지원되는 리전: 미국 동부(버지니아 북부)
+ Amazon Nova Micro - 지원되는 리전: 미국 동부(버지니아 북부)
+ Amazon Nova Pro - 지원되는 리전: 미국 동부(버지니아 북부)
+ Meta Llama 3.3 70B Instruct – 지원되는 리전: 미국 서부(오레곤)

## 사용자 지정 모델 배포
<a name="deploy-custom-model"></a>

Amazon Bedrock 콘솔 AWS Command Line Interface또는 AWS SDKs. 참조용 배포 사용 방법에 대한 자세한 내용은 [온디맨드 추론용 배포 사용](#use-custom-model-on-demand)을 참조하세요.

------
#### [ Console ]

사용자 지정 모델은 **사용자 지정 모델** 페이지에서 다음과 같이 배포할 수 있습니다. 동일한 필드를 사용하여 **온디맨드 사용자 지정 모델** 페이지에서도 모델을 배포할 수 있습니다. 이 페이지를 찾으려면 탐색 창에서 **추론** 아래의 **사용자 지정 모델 온디맨드**를 선택합니다.

**사용자 지정 모델 배포 방법**

1. Amazon Bedrock 콘솔을 사용할 권한이 있는 IAM 자격 증명 AWS Management Console 으로에 로그인합니다. 그 다음 [https://console.aws.amazon.com/bedrock](https://console.aws.amazon.com/bedrock)에서 Amazon Bedrock 콘솔을 엽니다.

1. 왼쪽 탐색 창의 **조정**에서 **사용자 지정 모델**을 선택합니다.

1. **모델** 탭에서 배포할 모델의 라디오 버튼을 선택합니다.

1. **추론 설정**과 **온디맨드 배포**를 차례로 선택합니다.

1. **배포 세부 정보**에서 다음 정보를 입력합니다.
   + **배포 이름**(필수) – 배포의 고유 이름을 입력합니다.
   + **설명**(선택 사항) – 배포에 대한 설명을 입력합니다.
   + **태그**(선택 사항) - 비용 할당 및 리소스 관리를 위해 태그를 추가합니다.

1. **생성(Create)**을 선택합니다. 배포 상태가 `Active`가 되면 사용자 지정 모델을 온디맨드 추론에 사용할 준비가 완료된 것입니다. 사용자 지정 모델 사용에 대한 자세한 내용은 [온디맨드 추론용 배포 사용](#use-custom-model-on-demand)을 참조하세요.

------
#### [ CLI ]

를 사용하여 온디맨드 추론을 위한 사용자 지정 모델을 배포하려면 사용자 지정 모델의 Amazon 리소스 이름(ARN)과 함께 `create-custom-model-deployment` 명령을 AWS Command Line Interface사용합니다. 이 명령은 [CreateCustomModelDeployment](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateCustomModelDeployment.html) API 작업을 사용합니다. 응답에는 배포의 ARN이 포함됩니다. 배포가 활성화되면 추론 요청을 할 때 이 ARN을 `modelId`로 사용합니다. 참조용 배포 사용 방법에 대한 자세한 내용은 [온디맨드 추론용 배포 사용](#use-custom-model-on-demand)을 참조하세요.

```
aws bedrock create-custom-model-deployment \
--model-deployment-name "{{Unique name}}" \
--model-arn "{{Custom Model ARN}}" \
--description "{{Deployment description}}" \
--tags '[
    {
        "key": "Environment",
        "value": "Production"
    },
    {
        "key": "Team",
        "value": "ML-Engineering"
    },
    {
        "key": "Project",
        "value": "CustomerSupport"
    }
]' \
--client-request-token "{{unique-deployment-token}}" \
--region {{region}}
```

------
#### [ API ]

온디맨드 추론을 위해 사용자 지정 모델을 배포하려면, 사용자 지정 모델의 Amazon 리소스 이름(ARN)과 함께 [CreateCustomModelDeployment](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateCustomModelDeployment.html) API 작업을 사용합니다. 응답에는 배포의 ARN이 포함됩니다. 배포가 활성화되면 추론 요청을 할 때 이 ARN을 `modelId`로 사용합니다. 참조용 배포 사용 방법에 대한 자세한 내용은 [온디맨드 추론용 배포 사용](#use-custom-model-on-demand)을 참조하세요.

다음 코드는 Python용 SDK(Boto3)를 사용하여 사용자 지정 모델을 배포하는 방법을 보여줍니다.

```
def create_custom_model_deployment(bedrock_client):
    """Create a custom model deployment
    Args:
        bedrock_client: A boto3 Amazon Bedrock client for making API calls

    Returns:
        str: The ARN of the new custom model deployment

    Raises:
        Exception: If there is an error creating the deployment
    """

    try:
        response = bedrock_client.create_custom_model_deployment(
            modelDeploymentName="{{Unique deployment name}}",
            modelArn="{{Custom Model ARN}}",
            description="{{Deployment description}}",
            tags=[
                {'key': 'Environment', 'value': 'Production'},
                {'key': 'Team', 'value': 'ML-Engineering'},
                {'key': 'Project', 'value': 'CustomerSupport'}
            ],
            clientRequestToken=f"deployment-{uuid.uuid4()}"
        )

        deployment_arn = response['customModelDeploymentArn']
        print(f"Deployment created: {deployment_arn}")
        return deployment_arn

    except Exception as e:
        print(f"Error creating deployment: {str(e)}")
        raise
```

------

## 온디맨드 추론용 배포 사용
<a name="use-custom-model-on-demand"></a>

사용자 지정 모델을 배포한 후 프롬프트를 제출하고 모델 추론을 통해 응답을 생성할 때 배포의 Amazon 리소스 이름(ARN)을 `modelId` 파라미터로 사용합니다.

추론 요청 방법에 대한 자세한 내용은 다음 주제를 참조하세요.
+ [모델 추론을 사용하여 프롬프트 제출 및 응답 생성](inference.md)
+ [모델 추론 실행을 위한 사전 조건](inference-prereq.md)
+ [API를 사용하여 프롬프트 제출 및 응답 생성](inference-api.md)

## 사용자 지정 모델 배포 삭제
<a name="delete-custom-model-deployment"></a>

온디맨드 추론에 모델 사용을 마친 후에는 배포를 삭제할 수 있습니다. 배포를 삭제하면 해당 배포를 온디맨드 추론에 사용할 수 없지만, 배포 삭제로 기본 사용자 지정 모델이 삭제되지는 않습니다.

Amazon Bedrock 콘솔 AWS Command Line Interface또는 AWS SDKs.

**중요**  
사용자 지정 모델 배포 삭제는 되돌릴 수 없는 작업입니다. 삭제를 진행하기 전에 해당 배포가 더 이상 필요하지 않은지 반드시 확인합니다. 동일한 사용자 지정 모델을 다시 온디맨드 추론에 사용하려면, 새로운 배포를 생성해야 합니다.

------
#### [ Console ]

**사용자 지정 모델 배포를 삭제하려면 다음 단계를 수행합니다.**

1. 탐색 창에서 **추론** 아래의 **사용자 지정 모델 온디맨드**를 선택합니다.

1. 삭제하려는 사용자 지정 모델 배포를 선택합니다.

1. **삭제**를 선택합니다.

1. 확인 대화 상자에서 삭제를 확인하기 위해 배포 이름을 입력합니다.

1. **삭제**를 선택하여 삭제를 확인합니다.

------
#### [ CLI ]

를 사용하여 사용자 지정 모델 배포를 삭제하려면 배포 식별자와 함께 `delete-custom-model-deployment` 명령을 AWS Command Line Interface사용합니다. 이 명령은 [DeleteCustomModelDeployment](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteCustomModelDeployment.html) API 작업을 사용합니다.

```
aws bedrock delete-custom-model-deployment \
--custom-model-deployment-identifier "{{deployment-arn-or-name}}" \
--region {{region}}
```

------
#### [ API ]

프로그래밍 방식으로 사용자 지정 모델 배포를 삭제하려면, 배포의 Amazon 리소스 이름(ARN) 또는 이름을 사용하여 [DeleteCustomModelDeployment](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_DeleteCustomModelDeployment.html) API 작업을 호출합니다. 다음 코드는 Python용 SDK(Boto3)를 사용하여 사용자 지정 모델 배포를 삭제하는 방법을 보여줍니다.

```
def delete_custom_model_deployment(bedrock_client):
    """Delete a custom model deployment

    Args:
        bedrock_client: A boto3 Amazon Bedrock client for making API calls

    Returns:
        dict: The response from the delete operation

    Raises:
        Exception: If there is an error deleting the deployment
    """

    try:
        response = bedrock_client.delete_custom_model_deployment(
            customModelDeploymentIdentifier="{{Deployment identifier}}"
        )

        print("Deleting deployment...")
        return response

    except Exception as e:
        print(f"Error deleting deployment: {str(e)}")
        raise
```

------