Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic table creation #157

Open
kshpytsya opened this issue Dec 11, 2018 · 0 comments
Open

Automatic table creation #157

kshpytsya opened this issue Dec 11, 2018 · 0 comments

Comments

@kshpytsya
Copy link

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant