protected function deleteTables()
    {
        if (empty( self::$tables )) {
            throw new \Exception('Cannot delete tables, as no configuration file given, or the ::$tables is not overridden.');
        }
        $client = $this->dynamoDb->getClient();

        $defaultAnswer = $this->input->getOption('yes');
        $a = 'n';
        foreach (self::$tables as $tableData) {
            $tableName = $tableData['TableName'];

            if ($this->tableExists($tableName)) {

                if ($defaultAnswer === false) {
                    $a = $this->ask(sprintf('Are you sure you want to delete table "%s"? [y/N]', $tableName), 'n');
                }

                if ($defaultAnswer || strtolower($a) === 'y') {
                    // Reset the answer.
                    $a = null;
                    $this->comment(sprintf('Deleting table "%s"', $tableName));

                    $client->deleteTable([
                        'TableName' => $tableName,
                    ]);
                    $client->waitUntil('TableNotExists', ['TableName' => $tableName]);

                    $this->info('Table deleted.');
                } else {
                    $this->comment(sprintf('Skipping table %s', $tableName));
                }
            } else {
                $this->warn(sprintf('Table "%s" does not exist.', $tableName));
            }
        }
    }