In the previous modules, you built an inventory system for an online game. To build this, you used:

These tools provide flexible, high-scale solutions to many problems you face when building high-traffic game applications.

In the following steps, you clean up the resources you created in this lab.

Time to Complete Module: 20 Minutes


  • Step 1. Delete Amazon Aurora Serverless database

    First, remove the Amazon Aurora Serverless database you created.

    1. Navigate to the RDS console, and in the left pane, choose Databases.
    2. Choose the inventory database.
    3. Choose Actions, then choose Delete.
    4. In the confirmation dialog box, for the Create final snapshot option, choose No, and select the I acknowledge check box.
    5. Choose Delete DB cluster.
  • Step 2. Delete database credentials in AWS Secrets Manager

    Next, delete the database credentials you saved in AWS Secrets Manager.

    1. Navigate to the Secrets Manager console.
    2. Choose the inventory-database secret.
    3. Choose Actions, then choose Delete secret.
    4. For safety, Secrets Manager requires a waiting period before a secret is permanently deleted. Use the default period of 30 days and choose Schedule deletion.
  • Step 3. Delete the AWS Lambda, Amazon API Gateway, and Amazon Cognito resources

    AWS Lambda and AWS API Gateway are billed on a pay-per-use basis, so you won’t be charged for leaving them in your account. Nevertheless, it’s best to clean up resources when you’re done using them.

    In the scripts/ folder, there is a file called delete-resources.sh. This script deletes your Lambda function, your API Gateway REST API, your function’s IAM role, and your Amazon Cognito user pool.

    Execute this script with the following command in your terminal:

    bash scripts/delete-resources.sh

    You should see the following output in your terminal:

    Removing REST API
    Deleting IAM role
    Deleting Lambda function
    Deleting Amazon Cognito User Pool
  • Step 4. Delete the AWS Cloud9 environment

    Finally, delete the AWS Cloud9 environment that you used in this lab:

    1. Navigate to the AWS Cloud9 console.
    2. Choose the Serverless Aurora Inventory environment and choose Delete.
    3. In dialog box, type Delete and choose Delete.