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

Incompatible with Localstack #156

Closed
jl-DaDar opened this issue Aug 30, 2022 · 2 comments
Closed

Incompatible with Localstack #156

jl-DaDar opened this issue Aug 30, 2022 · 2 comments

Comments

@jl-DaDar
Copy link

jl-DaDar commented Aug 30, 2022

not sure if this is dynamodump issue or a localstack issue. I can use aws cli on localstack so I assume this is a dynamodump issue.

bash-4.2# dynamodump --host xxxxx-container-localstack --port 4566 -m backup -r local -s xxxxxxxxx --accessKey test --secretKey test
INFO:root:Found 1 table(s) in DynamoDB host to backup: comm-dev-pricing-price-retails
INFO:root:Starting backup for xxxxxxxxx.
INFO:root:Dumping table schema for xxxxxxxxx
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/site-packages/dynamodump/dynamodump.py", line 673, in do_backup
    table_desc = dynamo.describe_table(TableName=table_name)
  File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 415, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 745, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the DescribeTable operation: Cannot do operations on a non-existent table


^CTraceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/dynamodump/dynamodump.py", line 1337, in main
    args.read_capacity,
AttributeError: 'Namespace' object has no attribute 'read_capacity'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/dynamodump", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/dynamodump/dynamodump.py", line 1367, in main
    q.join()
  File "/usr/lib64/python3.8/queue.py", line 89, in join
    self.all_tasks_done.wait()
  File "/usr/lib64/python3.8/threading.py", line 302, in wait
    waiter.acquire()
KeyboardInterrupt

@bchew
Copy link
Owner

bchew commented Oct 3, 2022

I did some tests and from what I can tell the issue is potentially due to dynamodump's usage of local as the region. As mentioned in #139 (comment), this would be outside the scope of the original intention of what the tool was designed for but happy for PRs of the changes to resolve this issue. 🙂

@mnuzzo-moxe
Copy link
Contributor

Wouldn't you be able to key off of if the host parameter is set instead of if the region is local? Or am I missing something that would make this change complex?

@bchew bchew closed this as completed in be53b4a Dec 13, 2022
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

3 participants