

# 사용자 지정 모델 배포 삭제


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

사용자 지정 모델은 Amazon Bedrock 콘솔, AWS Command Line Interface 또는 AWS SDK를 사용하여 삭제할 수 있습니다.

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

**Topics**
+ [

## 사용자 지정 모델 배포 삭제(콘솔)
](#delete-deployment-console)
+ [

## 사용자 지정 모델 배포 삭제(AWS Command Line Interface)
](#delete-deployment-cli)
+ [

## 사용자 지정 모델 배포 삭제(AWS SDK)
](#delete-deployment-sdk)

## 사용자 지정 모델 배포 삭제(콘솔)


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

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

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

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

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

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

삭제가 진행되는 동안 배포 상태가 `Deleting`로 변경됩니다. 삭제가 완료되면 해당 배포는 목록에서 제거됩니다.

## 사용자 지정 모델 배포 삭제(AWS Command Line Interface)


AWS Command Line Interface를 사용하여 사용자 지정 모델 배포를 삭제하려면, `delete-custom-model-deployment` 명령어와 배포 식별자를 사용합니다.

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

## 사용자 지정 모델 배포 삭제(AWS SDK)


프로그래밍 방식으로 사용자 지정 모델 배포를 삭제하려면, 배포의 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 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(f"Deployment deletion initiated")
        return response
 
    except Exception as e:
        print(f"Error deleting deployment: {str(e)}")
        raise
```