カスタムモデルのデプロイを削除する - Amazon Nova

カスタムモデルのデプロイを削除する

モデルのオンデマンド推論への使用が終了したら、デプロイを削除できます。デプロイを削除した後は、オンデマンド推論に使用することはできませんが、基盤となるカスタムモデルは削除されません。

Amazon Bedrock コンソール、AWS Command Line Interface、または AWS SDK を使用して、カスタムモデルのデプロイを削除できます。

重要

カスタムモデルデプロイの削除は元に戻せません。削除を続行する前に、今後デプロイが必要でないことを確認してください。オンデマンド推論にカスタムモデルを再度使用する必要がある場合は、新しいデプロイを作成する必要があります。

カスタムモデルのデプロイを削除する (コンソール)

カスタムモデルのデプロイを削除するには
  1. ナビゲーションペインの [推論と評価] で、[オンデマンドのカスタムモデル] を選択します。

  2. 削除するカスタムモデルデプロイを選択します。

  3. [削除] を選択します。

  4. 確認ダイアログで、デプロイ名を入力して削除を確定します。

  5. [Delete] を選択して確定します。

削除の進行中、デプロイのステータスは 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 API オペレーションを使用します。次のコードは、SDK for Python (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