Getting Started with AWS

Build a Serverless Web Application

with AWS Lambda, Amazon API Gateway, AWS Amplify, Amazon DynamoDB, and Amazon Cognito

We are aware of a problem with this tutorial. It is being updated. We appreciate your patience as we improve our content.  

Module 5: Resource Cleanup

To finish this experiment, you will go through the steps to clean up all the resources you created throughout this tutorial

Resource cleanup

In this module, you will go through the steps to clean up all the resources you created throughout this tutorial. You will delete your AWS Amplify app, an Amazon Cognito User Pool, an AWS Lambda function, an IAM role, a DynamoDB table, a REST API, and a CloudWatch Log. It is a best practice to delete resources you are no longer using to avoid unwanted charges.

 Time to complete

10 minutes


  • Delete your Amplify app.

    1. In the AWS Amplify console, select the wildrydes-site app you created in Module 1.
    2. On the app homepage, choose Actions and select Delete app. Enter delete when prompted to confirm, then choose Delete.
  • If you used the provided AWS CloudFormation template to complete Module 2, simply delete the stack using the AWS CloudFormation console. Otherwise, delete the Amazon Cognito user pool you created in Module 2.

    1. In the Amazon Cognito console, select your WildRydes User pool name.
    2. Choose Delete user pool.
    3. Select the checkbox next to Deactivate deletion protection.
    4. Enter WildRydes to confirm deletion, and choose Delete.
  • Delete the AWS Lambda function, IAM role and Amazon DynamoDB table you created in Module 3.

    AWS Lambda function

    1. In the AWS Lambda console on the Functions page, select the RequestUnicorn function you created in Module 3.
    2. From the Actions drop-down, choose Delete function.

    IAM role

    1. In the IAM console, select Roles from the left navigation pane.
    2. Enter WildRydesLambda into the filter box.
    3. Select the checkbox next to the role you created in Module 3, WildRydesLambda and choose Delete.
    4. To confirm deletion, enter WildRydesLambda into the text input field. Choose Delete

    Amazon DynamoDB table

    1. In the Amazon DynamoDB console, select Tables in the left navigation pane.
    2. Select the checkbox next to the Rides table you created in Module 3.
    3. Choose Delete.
    4. Select the checkbox next to Delete all CloudWatch alarms for Rides, enter confirm in the text input field, and choose Delete.
    5. The Status field on the Tables page will change to Deleting, and the table will disappear from the tables list when it has been successfully deleted. 
  • Delete the REST API created in Module 4. 

    1. In the Amazon API Gateway console, select the WildRydes API you created in Module 4.
    2. In the Actions dropdown, choose Delete.
    3. Choose Delete on the Delete API confirmation screen.
  • AWS Lambda automatically creates a new log group per function in Amazon CloudWatch Logs and writes logs to it when your function is invoked. You should delete the log group for the RequestUnicorn function. Also, if you launched any CloudFormation stacks, there may be log groups associated with custom resources in those stacks that you should delete.

    1. From the Amazon CloudWatch console, expand Logs in the left navigation pane and select Log groups.
    2. Select the checkbox next to the /aws/lambda/RequestUnicorn log group. If you have several log groups in your account, you can enter /aws/lambda/RequestUnicorn into the Filter text box to locate the log group.
    3. Select Delete log group(s) from the Actions dropdown.
    4. Choose Delete when prompted to confirm.
    5. If you launched any CloudFormation templates to complete a module, repeat steps 2-4 for any log groups that begin with /aws/lambda/wildrydes-webapp.

Was this page helpful?



Congratulations! You built and removed a serverless web application using AWS.