AWS V2 Cleanup allows an Org to configure their Stop Lab behavior to tailor fit their need. Without the option, the default Stop Lab behavior is to stop all EC2 and Sagemaker notebook instances.
For example, in ‘Stop Lab’, if one wants to keep all t2.micro instances running and stop the rest of the instances, the new feature can be used to configure the behavior.
Configuring Stop Lab Behavior
Navigate to your Org settings. Scroll down to the AWS Labs section and toggle Enable V2 Cleanup. Select Edit.
From the Cleanup page you can choose between EC2 or Sagemaker instances.
Select "+ Add Pattern" to define a Pattern and Action. The pattern is used to match the instance type. If matched, the defined Action is taken. Action can be non, stop, or terminate.
Remember to define a default action to catch up. By default the Pattern should be " * " with the Action set to stop.
Save the configuration and the stop lab will now act accordingly.