Skip to main content

Ceating tables in Dyanodb - Credentials

Created
Active
Viewed 40 times
1 replies
0
32 votes
5 answers
39k views

DynamoDB create tables in local machine

suma's user avatar
  • 331
28 votes

I would recommend using docker (but running the jar is also possible): $ docker run -d -p 8000:8000 amazon/dynamodb-local Then you can create a table in the docker container by passing in the ...

View answer
lvthillo's user avatar
  • 31k

When I run as per above I am getting following error

bishta2@MNM-NX9647WYYQ bookmyenvironment % docker run -d -p 8000:8000 amazon/dynamodb-local 
93fa22c13b27688d6da31831b23237c00821ab96b5efb0f9b5030fc4854ff261
bishta2@MNM-NX9647WYYQ bookmyenvironment % docker ps
CONTAINER ID   IMAGE                   COMMAND                  CREATED         STATUS         PORTS                    NAMES
93fa22c13b27   amazon/dynamodb-local   "java -jar DynamoDBL…"   3 seconds ago   Up 3 seconds   0.0.0.0:8000->8000/tcp   jolly_mirzakhani
bishta2@MNM-NX9647WYYQ bookmyenvironment % aws dynamodb create-table \                      
   --table-name UnifiedTable \
   --attribute-definitions AttributeName=pk,AttributeType=S AttributeName=sk,AttributeType=S \
   --key-schema AttributeName=pk,KeyType=HASH AttributeName=sk,KeyType=RANGE \
   --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
   --endpoint-url http://localhost:8000

Unable to locate credentials. You can configure credentials by running "aws configure".
M--
  • 29.8k
  • 10
  • 70
  • 106

1 reply

Sorted by:
79523818
0

Apparently you need to have set ENV Vars like AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and REGION (might be optional). According to the documentation they don't have to be valid.

Note The YAML scripts require that you specify an AWS access key and an AWS secret key, but they are not required to be valid AWS keys for you to access DynamoDB local.

Here link to documentation