Step 6: Stop and clean up your simulation - AWS SimSpace Weaver

Step 6: Stop and clean up your simulation

It's important to clean up your simulations when you don't need them anymore. SimSpace Weaver simulation resources count towards your service quotas (limits), even if your simulation is stopped. You will continue to get billing charges for simulations that are running. You might also get billing charges for data storage in supporting services, such as Amazon CloudWatch Logs and Amazon Simple Storage Service For more information about SimSpace Weaver service quotas, see SimSpace Weaver endpoints and quotas.

Follow the procedures in this section when you are ready to clean up your simulation.

Important

You can't restart a stopped simulation.

Important

You can't recover a deleted simulation.

Clean up simulation resources in SimSpace Weaver

You must stop your simulation before you can delete it. Deleting a simulation removes resources in SimSpace Weaver only. You must perform separate steps to delete resources that your simulation created or uses in other services (see the following section).

Docker
To clean up your simulation
  1. If you aren't there already, go to the tools folder for your project and platform. Your project-folder is path\project-name using the values that you provided when you created the project.

    At a Windows command prompt, enter:

    cd project-folder\tools\windows
  2. Find the names of your simulations.

    .\weaver-project-name-cli.bat list-simulations
    Important

    If you use AWS IAM Identity Center or named profiles for the AWS Command Line Interface (AWS CLI), you must use SimSpace Weaver app SDK version 1.12.1 or higher. The latest version is 1.16.0. For information about SimSpace Weaver versions, see SimSpace Weaver versions. The SimSpace Weaver app SDK scripts use the AWS CLI. If you use IAM Identity Center, you can either copy your IAM Identity Center profile for the AWS CLI to your default profile or provide the name of your IAM Identity Center profile to SimSpace Weaver app SDK scripts with the --profile cli-profile-name parameter. For more information, see Configuring the AWS CLI to use AWS IAM Identity Center in the AWS Command Line Interface User Guide and Configuration and credential file settings in the AWS Command Line Interface User Guide.

  3. Stop a simulation.

    .\weaver-project-name-cli.bat stop-simulation --simulation simulation-name
  4. Delete a stopped simulation.

    .\weaver-project-name-cli.bat delete-simulation --simulation simulation-name
WSL
Important

We provide these instructions for your convenience. They are for use with Windows Subsystem for Linux (WSL), and are unsupported. For more information, see Set up your local environment for SimSpace Weaver.

To clean up your simulation
  1. If you aren't there already, go to the tools folder for your project and platform.Your project-folder is path/project-name using the values that you provided when you created the project.

    At a Linux shell prompt, enter:

    cd project-folder/tools/linux
  2. Find the names of your simulations.

    ./weaver-project-name-cli.sh list-simulations
    Important

    If you use AWS IAM Identity Center or named profiles for the AWS Command Line Interface (AWS CLI), you must use SimSpace Weaver app SDK version 1.12.1 or higher. The latest version is 1.16.0. For information about SimSpace Weaver versions, see SimSpace Weaver versions. The SimSpace Weaver app SDK scripts use the AWS CLI. If you use IAM Identity Center, you can either copy your IAM Identity Center profile for the AWS CLI to your default profile or provide the name of your IAM Identity Center profile to SimSpace Weaver app SDK scripts with the --profile cli-profile-name parameter. For more information, see Configuring the AWS CLI to use AWS IAM Identity Center in the AWS Command Line Interface User Guide and Configuration and credential file settings in the AWS Command Line Interface User Guide.

  3. Stop a simulation.

    ./weaver-project-name-cli.sh stop-simulation --simulation simulation-name
  4. Delete a stopped simulation.

    ./weaver-project-name-cli.sh delete-simulation --simulation simulation-name
AWS Management Console
To clean up your simulation
  1. Open the SimSpace Weaver console at SimSpace Weaver console.

  2. From the navigation pane, choose Simulations.

  3. From the Simulations list, select the option next to the name of the simulation that you want to delete.

  4. If the Status of the simulation that you selected is STARTED:

    1. Choose the Actions drop-down menu.

    2. Choose Stop.

    3. To confirm, enter your simulation name.

    4. Choose Stop.

    5. Wait until the Status of your simulation is STOPPED.

  5. Choose the Actions drop-down menu.

  6. Choose Delete.

  7. To confirm, choose Delete.

Clean up simulation resources in supporting services

To support your simulation, SimSpace Weaver creates resources in other services. SimSpace Weaver doesn't delete these resources when you delete your simulation. You can delete these additional resources if you don't need them.

Important

You might get billing charges for any of these resources that you don't delete.

To delete support resources for your project
  1. If you are done with your project, delete its AWS CloudFormation stack. For more information about working with AWS CloudFormation, see Deleting a stack on the AWS CloudFormation console in the AWS CloudFormation User Guide.

    • weaver-project-name-stack

    Important

    Simulations that you started from the same project share resources such as the app role. When you delete the AWS CloudFormation stack, you delete the app role. Don't delete your AWS CloudFormation stack if you have other simulations that share the same resources.

    Note

    Your AWS CloudFormation stack will probably report DELETE_FAILED because it can't delete Amazon S3 buckets that aren't empty. You will delete your Amazon S3 buckets in the following step.

  2. If you are done with your project, delete its Amazon S3 bucket(s). For more information on working with Amazon S3 buckets, see Deleting a bucket in the Amazon Simple Storage Service User Guide.

    • weaver-lowercase-project-name-account-number-region

    For example, the project named MyProject in the account 111122223333 in the us-west-2 Region has the following bucket:

    • weaver-myproject-111122223333-us-west-2

    Note

    You must delete the contents of an Amazon S3 bucket before you can delete the bucket.

    Note

    SimSpace Weaver app SDK version 1.12.x projects use separate buckets for the app .zip files and the schema:

    • weaver-lowercase-project-name-account-number-app-zips-region

    • weaver-lowercase-project-name-account-number-schemas-region

  3. If you turned on logging for your simulation, delete the CloudWatch Logs log group. For more information about working with CloudWatch Logs, see Working with log groups and log streams in the Amazon CloudWatch Logs User Guide.

    The name of the log group for your simulation is specified in its schema (configuration file): project-folder\tools\project-name.yaml

    The name of the log group is the value of log_destination_resource_name. The following schema snippet shows that the log group for the sample application is MySimulationLogs.

    
    simulation_properties:
      log_destination_service: "logs"
      log_destination_resource_name: "MySimulationLogs"
      default_entity_index_key_type: "Vector3<f32>"
    
    
    Warning

    If you start multiple simulations that specify the same log group then the log data for all of those simulations will go to the same log group. If you delete the log group then you delete the log data for all simulations that use that log group. If you delete a log group for a running simulation then the simulation will fail.

    Important

    If your simulation's schema specifies log_destination_service: "logs" and a log_destination_resource_name but you can't find the log group in CloudWatch Logs, make sure that you check the same AWS Region that your simulation ran in.