Clean Up Resources
After completing the workshop, deleting all provisioned resources is an essential step to prevent unexpected cloud charges and keep your AWS account clean.
Please perform the teardown according to the following sequence:
- Delete manually created SQS queues and subscriptions.
- Empty the Amazon S3 bucket.
- Delete the AWS CloudFormation stack.
- Verify on the Console to ensure all resources have been completely decommissioned.
Delete Manually Created SQS Queue
- Open the Amazon SQS Console.
- Select the queue you created manually in Chapter 5:
ColdBrewExpressQueue.
- Click the Delete button on the action bar above the table.

- Type
delete into the confirmation field, then click Delete.

- Verify that
ColdBrewExpressQueue has disappeared from the queues list.

Delete Email Subscription on Amazon SNS
- Open the Amazon SNS Console.
- In the left navigation menu, click Subscriptions.
- Locate and select your personal Email subscription pointing to the
CoffeeOrders topic.
- Click the Delete button.


Empty the Amazon S3 Bucket
AWS CloudFormation cannot automatically delete an Amazon S3 Bucket if it still contains objects (such as the index.html file). You must empty the bucket before deleting the CloudFormation stack.
Empty via the Console
- Open the Amazon S3 Console.
- Click on the coffee shop bucket (beginning with
aws-event-driven-architectures-wo-coffeeshopbucket-...).
- Click the Empty button on the top toolbar.

- Type
permanently delete into the confirmation field, then click the Empty button.

- Click Exit to return to the buckets list.

Quick Empty via AWS CLI
Run the following command in your terminal window:
aws s3 rm s3://<S3BucketName> --recursive
Once the S3 bucket is cleared, CloudFormation will automatically tear down all remaining resources in a single operation.
- Open the AWS CloudFormation Console.
- Select the stack:
aws-event-driven-architectures.
- Click button “Delete stack”.

- In the confirmation dialog, click Delete stack.

-
The stack status will transition to DELETE_IN_PROGRESS. CloudFormation will sequentially remove:
- S3 Bucket and Bucket Policy.
- SNS Topic
CoffeeOrders and remaining subscriptions.
- All SQS Queues (
BaristaQueue, VIPExpressQueue, and BaristaDLQ).
- Lambda Function
order-publisher and its Function URL.
- IAM Execution Role.
-
After about 1 to 2 minutes, the stack will complete its deletion process and automatically vanish from the active stacks list.

Verify Removal on AWS Management Console
- Verify SQS: Open Amazon SQS; no workshop queues should remain.
- Verify SNS: Open Amazon SNS; the
CoffeeOrders topic should be deleted.
- Verify Lambda: Open AWS Lambda; the
order-publisher function should no longer appear in the list.
- Verify S3: Open Amazon S3; the workshop bucket should be permanently deleted.
You have completed the Building an Event-Driven Architecture with Amazon SNS and SQS workshop!
Through this lab, you have:
- Successfully designed and deployed a complete Event-Driven Architecture (EDA).
- Mastered the Fan-Out pattern to distribute events asynchronously to both Email and kitchen queues.
- Maximized the power of Amazon SNS Subscription Filter Policies for intelligent attribute-based routing.
- Applied fault tolerance with a Dead-Letter Queue (DLQ) to isolate poison pill messages without disrupting the system.
- Deployed an interactive static frontend on Amazon S3 and integrated it seamlessly with AWS Lambda Function URLs.