Skip to content

Remove AWS environments

You can remove your AWS environment from Sophos Cloud Optix.

You also need to remove Sophos Cloud Optix resources from your AWS environments. For more information on the resources created in your AWS environments by Sophos Cloud Optix, see Resources created in AWS environments.

If you want to add the same AWS environment again later, using a different Sophos Cloud Optix account, contact Support for help.

Remove AWS environments from Sophos Cloud Optix

If you still have access to your Sophos Cloud Optix account, you must manually remove your AWS environment from Sophos Cloud Optix. To do this, do as follows:

  1. Click Environments.
  2. Find the AWS environment you want to delete and click the trashcan icon Trashcan icon..
  3. Read the information about the effects of removing Sophos Cloud Optix from your AWS environment.
  4. If you're sure you wish to continue, click Confirm deletion.

If you can't do this because you don't have access to your Sophos Cloud Optix account, we automatically remove the data in the account 30 days after your account expires.

Remove Sophos Cloud Optix resources from AWS

A full Sophos Cloud Optix setup creates resources in your AWS environment that send logs to the service. The methods described on this page delete these resources, but they don't remove S3 buckets. You must manually remove them from your AWS environment afterward.

If you still have access to your Sophos Cloud Optix account, remove your AWS environment with the same method you used to add it. For example if you added an environment using CloudFormation, you must use CloudFormation to remove it.

The methods are as follows:

If you don't have access to your Sophos Cloud Optix account, for example if your free trial has ended, you must use the AWS CLI script to remove Sophos resources from your AWS environments.

AWS CloudFormation

To remove Sophos Cloud Optix resources that were added with the AWS CloudFormation method, follow the instructions in Deleting a stack on the AWS CloudFormation console.

You must then check for S3 buckets. Delete them manually from your AWS environment if necessary.

AWS CLI script

If you added an environment with the ASW CLI script method, you must use the script we provide to remove Sophos Cloud Optix resources from your AWS environment.

To do this, do as follows:

  1. From the AWS CLI, download the script to your system with the following command:

    curl -s "http://avidcore.s3-us-west-2.amazonaws.com/aws/collectorv2-config/undo-add-account.sh" -o undo-add-account.sh

  2. Run the script with the command:

    bash undo-add-account.sh

When the script finishes, you must check for S3 buckets and delete them manually if necessary.

Terraform

When you add an AWS environment to Sophos Cloud Optix using Terraform, a .tfstate file is created with details of the resources created. If the .tfstate file still exists, you can remove the environment. To do this, use the terraform destroy command.

When prompted to enter a region, you must enter the same value used when you added the environment to Sophos Cloud Optix.

When the command finishes, you must check for S3 buckets and manually delete them from your AWS environment if necessary.

If you no longer have the .tfstate file, you must use the AWS CLI script to remove your environment.