Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamoDB locally

Im trying to run dynamoDB locally in Ubuntu. I have done everything as here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html If I want to check if my database works locally:

aws dynamodb list-tables --endpoint-url http://localhost:8000

Im getting:

alexa@alexa-VirtualBox:~/Desktop/DynamoDB$ aws dynamodb list-tables --endpoint-url http://localhost:8000
Unable to locate credentials. You can configure credentials by running "aws configure".

Why? I dont want to use AWS. I thought I can be able to test locally dynamodb without AWS account. Is it possible?

like image 693
Anna K Avatar asked Jan 03 '18 15:01

Anna K


1 Answers

Despite the fact you're hitting a local endpoint that doesn't require credentials the aws cli tool you're using to interact with the dynamoDB-local still looks for values for the expected AWS credentials to sign your requests with.

This is what the final point in https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html is trying to suggest. If you set dummy values for AWS Access Key ID, AWS Secret Access Key and set a default region by running aws configure as suggested you should be able to successfully run commands against your dynamoDB-local instance.

This page on configuring the AWS CLI gives more details on what's going on behind the scenes here.

like image 116
gjtempleton Avatar answered Oct 20 '22 17:10

gjtempleton