Cleaning up resources - Amazon Personalize

Cleaning up resources

To avoid incurring unnecessary charges, delete the resources you created after you're done with the getting started exercise. To delete the resources with the Amazon Personalize console, you choose Delete on the details page for the resource. To delete a resource with Amazon Personalize APIs, you use the Delete APIs with the SDKs or the AWS Command Line Interface (AWS CLI).

For detailed steps on deleting a dataset with the Amazon Personalize console, AWS Command Line Interface (AWS CLI), or AWS SDKs, see . You can apply the patterns in these steps to other Amazon Personalize resources.

Some resources must be deleted before others. The following sections provide guidelines for deleting resources and list the order to delete domain-based and custom resources.

Guidelines for cleaning up resources

The following applies to both domain-based and custom resources:

  • You can't delete a resource whose status is CREATE PENDING or IN PROGRESS. The resource status must be ACTIVE or CREATE FAILED. Check the status using the Describe APIs, for example, the DescribeCampaign API operation.

  • To delete the training data you uploaded to Amazon S3, ratings.csv, see How do I delete objects from an S3 bucket?.

  • Before you delete a dataset, make sure all dataset import jobs for the dataset complete.

  • You aren't charged for dataset import jobs after they complete and you can't delete them.

  • You can't delete a schema with the Amazon Personalize console and you aren't charged to store schemas. To delete a schema, use the DeleteSchema API operation.

Cleaning up domain-based resources

If you created a Domain dataset group, delete resources in the following order:

  1. Recommender – To delete your recommender with the APIs, use the DeleteRecommender API operation. To delete a recommender with the console, choose your recommender on the Recommenders page and then choose Delete at the top right.

  2. Dataset – To delete your Item interactions dataset with the APIs, use the DeleteDataset API operation. To delete the dataset with the console, choose the dataset on the Datasets page to view its details page. Then choose Delete at the top right.

    Note

    To delete a dataset, no associated dataset import jobs can have a status of CREATE PENDING or IN PROGRESS. And no associated recommenders can have a status of CREATE PENDING or IN PROGRESS.

  3. Dataset group – To delete your dataset group with the APIs, use the DeleteDatasetGroup API operation. To delete your dataset group with the console, on the Dataset groups page, choose your dataset group and choose Delete at the top right.

Cleaning up custom resources

If you created a Custom dataset group, delete the custom resources you created in this tutorial in the following order.

  1. Campaign – To delete your campaign with the APIs, use the DeleteCampaign API operation. To delete a campaign with the console, choose your campaign on the Campaigns page and then choose Delete at the top right.

  2. Solution – To delete your solution with the APIs, use the DeleteSolution API operation. To delete your solution with the console, choose your solution on the Solutions page to view its details page. Then choose Delete at the top right.

    Note

    Deleting a solution deletes all associated solution versions. No solution versions can have a status of CREATE PENDING or IN PROGRESS.

  3. Dataset – To delete your Item interactions dataset with the APIs, use the DeleteDataset API operation. To delete the dataset with the console, choose the dataset on the Datasets page to view its details page. Then choose Delete at the top right.

    Note

    To delete a dataset, no associated DatasetImportJob can have a status of CREATE PENDING or IN PROGRESS. And no associated SolutionVersion can have a status of CREATE PENDING or IN PROGRESS.

  4. Dataset group – To delete your dataset group with the APIs, use the API operation. To delete your dataset group with the console, on the Dataset groups page, choose your dataset group and choose Delete at the top right.