how to delete sagemaker project with missing resources?


I mistakenly deleted the CloudFormation Stack related to the SageMaker project. and then attempting to delete the project from the projects panel in SageMaker Studio, it fails with a 'stack with id : does not exist' message, resulting in a 'delete failed' status." How can I Fix it?

1 Answer

Hi , Can you run DescribeProject action [1] against the project and confirm what is the ProjectStatus. From CLI you can run: aws sagemaker describe-project --project-name <value> . The response from the above command will include a "ProvisionedProductStatusMessage" which will explain why the deletion failed. The issue might be related to missing IAM permissions. Your sagemaker execution role needs to have the following policy statement in the AmazonSageMakerFullAccess policy [2]:

{ "Effect": "Allow", "Action": [ "servicecatalog:TerminateProvisionedProduct", "servicecatalog:UpdateProvisionedProduct" ], "Resource": "*", },

Another potential factor could be that, during the deletion of the project, Service Catalog attempted to assume a role which was attached the service catalogue product but encountered a failure in assuming the role. To troubleshoot this issue, please verify the existence of the roles. If the roles are not found, consider re-creating them in your account. Ensure that the newly created roles have identical names and permissions as the roles that were deleted.

After that try deleting the projects again using: aws sagemaker delete-project --project-name <value>

Reference [1] [2] [3]

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions