aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 54 forks source link

AWS::SageMaker::Domain does not delete EFS share on stack delete #1085

Open jfamestad opened 2 years ago

jfamestad commented 2 years ago

Name of the resource

AWS::SageMaker::Domain

Resource Name

No response

Issue Description

SageMaker Studio Domains deploy an EFS share as part of its resource provisioning. When deleting a stack that contains AWS::SageMaker::Domain CloudFormation does not delete the EFS share associated with the domain.

Expected Behavior

When a stack containing a domain is deleted, the EFS share that was implicitly created with the domain should be deleted as well.

Observed Behavior

The EFS share was not deleted. If the subnet is in the same Stack, the stack will enter a failed state because the network will fail to delete due to the EFS network adapter still being attached.

Test Cases

Other Details

Some users may wish to preserve their data which could be supported using the RetentionPolicy parameter to the delete_domain() call as done in this example that uses a custom resource to manage the SageMaker Domain.

https://github.com/aws-samples/cloudformation-studio-domain/blob/main/domain_function.py

RetentionPolicy={ 'HomeEfsFileSystem': 'Delete' }

javydekoning commented 9 months ago

Where is this shipped? I couldn't find where this is, and https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-sagemaker/blob/main/aws-sagemaker-domain/aws-sagemaker-domain.json doesn't have any efs:Delete* permissions?

spssmn-aws commented 6 months ago

+1 why has this been closed - the feature does not exist ?

SGhotra1 commented 3 weeks ago

+1 Please reopen this!