From 46355e255b9fea08e517646717fcccae944174fc Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sat, 22 Jun 2024 11:00:04 +0100 Subject: [PATCH] Autosave: 2024-06-22 11:00:04 --- zk/DynamoDB CLI commands.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 zk/DynamoDB CLI commands.md diff --git a/zk/DynamoDB CLI commands.md b/zk/DynamoDB CLI commands.md new file mode 100644 index 0000000..c73a743 --- /dev/null +++ b/zk/DynamoDB CLI commands.md @@ -0,0 +1,30 @@ +--- +id: l045 +title: DynamoDB CLI commands +tags: [AWS, databases, dynamodb] +created: Saturday, June 22, 2024 +--- + +# DynamoDB CLI commands + +## Connecting to a local (Docker) DynamoDB instance + +In order to distinguish between local and production accounts you should keep +seperate configs in `.aws/config` and `.aws/credentials`. Then specify the +profile if you are working locally and the local URL. Without the `--profile` +flag, AWS will default to the `default` profile which will typically be your +credentials for accessing AWS on the remote. + +```sh +aws dynamodb list-tables --profile timetracking_dev --endpoint-url +http://localhost:800 +``` + +## Delete a table + +```sh +aws dynamodb delete-table --profile timetracking_local --endpoint-url http://localhost:8000 --table-name PersistentTable + +``` + +## Related notes