Uninstall the solution
You can uninstall the Amazon Marketing Cloud Insights on AWS solution from the AWS Management Console or by using the AWS Command Line Interface (AWS CLI). You must manually delete the Amazon S3 buckets created by this solution. AWS Solutions implementations do not automatically delete Amazon S3 buckets in case you have stored data to retain.
Using the AWS Management Console
-
Sign in to the AWS CloudFormation console
. -
On the Stacks page, select this solution’s installation stack.
-
Choose Delete.
Using AWS Command Line Interface
Determine whether AWS CLI is available in your environment. For installation instructions, see What Is the AWS Command Line Interface in the AWS CLI User Guide. After confirming that the AWS CLI is available, run the following command.
$ aws cloudformation delete-stack --stack-name <installation-stack-name>
Deleting the Amazon S3 buckets
This solution is configured to retain the solution-created Amazon S3 bucket (for deploying in an opt-in Region) if you decide to delete the AWS CloudFormation stack to prevent accidental data loss. After uninstalling the solution, you can manually delete this S3 bucket if you do not need to retain the data. Follow these steps to delete the Amazon S3 bucket.
-
Sign in to the Amazon S3 console
. -
Choose Buckets from the left navigation pane.
-
Locate the <stack-name> Amazon S3 buckets.
-
Select the Amazon S3 bucket and choose Empty to remove all data from the bucket.
-
Select the Amazon S3 bucket and choose Delete to permanently remove the bucket from your account.
To delete the Amazon S3 bucket using AWS CLI, run the following command:
$ aws s3 rb s3://<bucket-name> --force
Deleting the data lake administrators
A data lake administrator is an IAM user; or IAM role that can view all metadata in the AWS Glue Data Catalog and grant permissions on the data resources. After uninstalling the solution, the IAM user; or IAM role created by the solution are deleted, but the data lake administrators in AWS Lake Formation console may not reflect the deletion. You can manually delete the data lake administrators from AWS Lake Formation console by following these steps.
-
Sign in to the AWS Lake Formation console
. -
Choose Administrative roles and tasks.
-
Choose Manage Administrators in Data lake administrators.
Remove the IAM role created by the solution from the data lake administrators list.
Using the cleanup scripts
When you decide to no longer use the solution and not retain the data, delete all the resources deployed by this solution to prevent charges for them. After uninstalling the solution, besides the manual deletion steps described in Uninstall the solution, you can use the cleanup scripts provided in the repo to permanently delete all remaining resources in services like CloudWatch, S3, DynamoDB, KMS, SQS, Lambda, EventBridge, CloudFormation, and Lake Formation. To delete the resources:
-
Download the Amazon Marketing Cloud Insights user scripts.
-
Open a new terminal session and navigate to the
cleanup_scripts
directory. -
Run the following command. Replace the
<stack-name>
,<profile-name>
, and<region-name>
variables.$ sh run-delete-resources.sh --<stack-name> STACK_NAME --<profile-name> PROFILE --<region-name> REGION