Remove a Snyk Cloud Environment
When you remove a Snyk Cloud Environment, Snyk removes all associated scans, issues, and records of resources. Your actual resources in the cloud provider are not affected.
In the Snyk Web UI, you can remove a cloud environment by navigating to your Organization's Settings (cog icon) > Cloud environments. See View Snyk Cloud Environments.
To remove an environment using the Snyk API, send a request to the
/cloud/environments
endpoint in the below format. You can find the environment ID using the method shown in Find the environment ID.curl -X DELETE \
'https://api.snyk.io/rest/orgs/YOUR-ORGANIZATION-ID/cloud/environments/YOUR-ENVIRONMENT-ID?version=2022-12-21~beta' \
-H 'Authorization: token YOUR-SERVICE-ACCOUNT-TOKEN'
There is no output if the command is successful.
Removing an environment does not remove the Snyk Identity & Access Management (IAM) role. To fully remove Snyk's access to your Amazon Web Services (AWS) account, delete the IAM role using the same infrastructure as code tool that created it:
- CloudFormation: delete the CloudFormation stack using the AWS Management Console or the AWS CLI's delete-stack command.
Removing an environment does not remove the Google service account. To fully remove Snyk's access to your Google project, delete the Google service account using the Google Cloud console or CLI.
Last modified 22d ago