2

i am running dynamodb on a docker container and am able to write to the table using python boto3, which is all fine and good.

now when I query the dynamodb table from outside the container using aws CLI, its give this error and cannot find the table

╰─➤  aws dynamodb --region=eu-west-1 --endpoint-url http://localhost:8000  scan --table-name devApiConfig

A client error (ResourceNotFoundException) occurred when calling the Scan operation: Cannot do operations on a non-existent table

the name of the sqlite db created by dynamodb docker container is

localaccesskey_eu-west-1.db


aws --region=eu-west-1 dynamodb list-tables --endpoint-url http://localhost:8000                                                                                                                                     
{
    "TableNames": []
}

Any ideas or hints, as the tables do exist on the dynamodb when used from Boto3....?

1
  • It looks like security problem Because inside environment access is working but outside - not. So need to double check. Generally if there is no some access - AWS returns empty list Commented Jul 14, 2016 at 15:30

1 Answer 1

3

I have answered this in another question: https://stackoverflow.com/a/40806393/1061798

Check how your docker is starting Dyanmo. If you are using deangiberson/aws-dynamodb-local (as I was), then you will need to change the start parameters to add -sharedDb. Either amend the Dockerfile or run as follows:

docker run -p 8000:8000 -d -it deangiberson/aws-dynamodb-local "-sharedDb"

I haven't tested, so let me know if this doesn't work, but hopefully you get the idea.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.