Skip to content

Destroy Base ArcGIS Enterprise on Windows in AWS

Pavel Bobov edited this page Apr 22, 2025 · 2 revisions

This walkthrough will guide you through the process of destroying deployments of standalone highly available base ArcGIS Enterprise in Amazon Web Services (AWS) that were deployed with Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.

The walkthrough uses aws/arcgis-enterprise-base-windows template.

Duration: about 15 minutes

Prerequisites

Before you begin this walkthrough:

  • A private GitHub repository "gitops-demo" for the site must be created and properly configured.
  • A highly available base ArcGIS Enterprise on Windows operating system must be deployed in the site using Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.

You will need the following resources and accounts:

  • GitHub.com user account
  • Access keys of an AWS user with permissions to update IAM users (IAMFullAccess AWS managed IAM policy)

Step 1: Create and Configure a Codespace Workspace

This step creates a codespace workspace in the "gitops-demo" repository, installs AWS CLI v2, and configures it with the AWS account access keys.

1.1 Log in to GitHub.com account

Open the GitHub.com URL in a web browser, log in to your GitHub.com account, and select "gitops-demo" private repository form the "Your repositories" list.

1.2 Create a codespace workspace in the new repository

In the "gitops-demo" repository, click the green "Code" button, switch to the "Codespaces" tab, and click the "Create codespace on main" button. The codespace will be created and opened in a new browser tab.

Note that instead of creating a codespace, you can also reuse the codespace created in Getting Started in AWS walkthrough if it is still available. In this case, you can skip this step and go to Step 1.5.

1.3 Install AWS CLI v2 in the codespace

In the codespace, click on the "Terminal" tab in the bottom panel, and run the following commands:

cd /tmp
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Output:

You can now run: /usr/local/bin/aws --version

1.4 Configure the AWS CLI

Run the following commands and enter the AWS account user's access keys and the default AWS region ID when prompted:

aws configure

1.5 Attach policies to the IAM user

Attach the policies required for running the workflows to gitops-demo IAM user.

export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws iam attach-user-policy --policy-arn arn:aws:iam::$AWS_ACCOUNT_ID:policy/ArcGISEnterpriseDestroy --user-name gitops-demo

Step 2: Destroy the Base ArcGIS Enterprise Deployment

This step cleans up the AWS resources used by the base ArcGIS Enterprise deployment.

2.1 Backup the deployment

Before destroying the deployment, it is recommended to create a backup of the deployment. The backup will be stored in the site's backups S3 bucket.

Run "enterprise-base-windows-aws-backup" workflow in the GitHub Actions tab of the repository with the main branch to backup the deployment.

2.2 Destroy the deployment

Run "enterprise-base-windows-aws-destroy" workflow with the main branch to destroy the base ArcGIS Enterprise deployment.

Note that the workflow does not destroy the deployment's backups.

Step 3: Update the Configuration Files

This step updates the configuration files in the "gitops-demo" repository to remove the base ArcGIS Enterprise deployment from the site.

3.1 Remove the deployment from the site index

In the EXPLORER sidebar of the codespace window, click on "config" folder and then on "aws" subfolder. Double-click on "site-index.json" file to open it in the editor.

Remove "arcgis-enterprise-base-windows" entry from the "deployments" property array in config/aws/site-index.json file.

3.2 Commit and push the changes to the repository

git add --all
git commit -m "Removed arcgis-enterprise-base-windows from site-index.json"
git push origin main

Conclusion

This walkthrough demonstrated how to destroy a deployment of highly available base ArcGIS Enterprise in AWS that was deployed with Deploy Base ArcGIS Enterprise on Windows in AWS walkthrough.

Clone this wiki locally