Skip to content

Automatic table creation #157

@kshpytsya

Description

@kshpytsya
  • Python DynamoDB Lock version: 0.9.1

It would be great if the library would (optionally) automatically create the locks table if it does not yet exist, or at least document how it would be possible to accomplish it on the client side.

Currently, calling create_dynamodb_table multiple times fails with

botocore.errorfactory.ResourceInUseException: An error occurred (ResourceInUseException) when calling the CreateTable operation: Table already exists: DynamoDBLockTable

error, and not calling it at all fails with

python_dynamodb_lock.python_dynamodb_lock.DynamoDBLockError: DynamoDBLockError: UNKNOWN - An error occurred (ResourceNotFoundException) when calling the GetItem operation: Requested resource not found

At least make a distinct error code for the case of missing table instead of the unhelpful DynamoDBLockError.UNKNOWN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions