Build an Application Using a NoSQL Key-Value Data Store
GETTING STARTED GUIDE
Module 5: Cleanup and next steps
Clean up the resources created in this tutorial and check out additional information to learn more
Introduction
You have now completed this guide, but you still need to clean up the resources created during this guide. If your account is still in the free tier, there will not be any monthly charges. Once out of the free tier, there will not be any cost if no API calls are made, only when you use the application. Please see the AWS DynamoDB Pricing page for the details.
You will now remove your application, and all the resources created for it on AWS.
What You Will Learn
- How to remove AWS resources created for tutorial
Time to Complete
< 2 minutes
Prerequisites
- An AWS account: if you don't already have one, follow the Setting Up Your Environment getting started guide for a quick overview.
- An installed version of the AWS SDK via pip install boto3
Implementation
Step: Delete your table
The following code will delete the Books table used for the tutorial.
import boto3
client = boto3.client('dynamodb', region_name='us-east-1')
try:
resp = client.delete_table(
TableName="\"Books\",
)
print("Table deleted successfully!")
except Exception as e:
print("Error deleting table:")
print(e)
Congratulations!
You have completed the tutorial on building an application using a NoSQL key-value data store.
For more information on DynamoDB, you can check out the following resources: