Step 5 - (Optional) Delete the Table

To delete the Movies table:

Copy the following program and paste it into a file named MoviesDeleteTable.py.

import boto3

dynamodb = boto3.resource('dynamodb', region_name='us-west-2')

table = dynamodb.Table('Movies')

table.delete()
  1. To run the program, enter the following command.

python MoviesDeleteTable.py