I\'m a new user in boto3 and i\'m using DynamoDB
.
I went through over the DynamoDB api and I couldn\'t find any method which tell me if a table is already e
Note that it kind of depends on if you are using client or resource. If you use boto3.client()
, you can use the 3 methods the accepted answer suggested. If you are using boto3.resource()
, you can only use dynamodb_resource.create_table()
and check exceptions.
try:
table = dynamodb_resource.create_table(
...
)
table.meta.client.get_waiter('table_exists').wait(TableName=your_table_name)
except ResourceInUseException:
# do sth here