diff --git a/.zk/notebook.db b/.zk/notebook.db index 4d3ddd7..521b1e9 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/zk/DynamoDB CLI commands.md b/zk/DynamoDB CLI commands.md deleted file mode 100644 index d837e97..0000000 --- a/zk/DynamoDB CLI commands.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: l045 -title: DynamoDB CLI commands -tags: [AWS, databases, dynamodb] -created: Saturday, June 22, 2024 ---- - -# DynamoDB CLI commands - -## Connecting to a local (Docker)/prod (AWS) DynamoDB instance - -In order to distinguish between local and production accounts you should keep -seperate profiles for each (via `.aws/config` and `.aws/credentials`). - -When connecting to a local DB use the local profile 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. - -For example: - -```sh -aws dynamodb list-tables \ ---profile timetracking_dev \ ---endpoint-url http://localhost:800 -``` - -## Delete a table - -```sh -aws dynamodb delete-table \ ---profile timetracking_dev \ ---endpoint-url http://localhost:8000 \ ---table-name TableName -``` - -## Create table from JSON schema - -```sh -aws dynamodb create-table \ ---cli-input-json file://create-timeentries-table.json \ ---profile timetracking_dev \ ---endpoint-url http://localhost:8000 - -``` - -## Related notes diff --git a/zk/DynamoDB_CLI_commands.md b/zk/DynamoDB_CLI_commands.md index a0c4280..d837e97 100644 --- a/zk/DynamoDB_CLI_commands.md +++ b/zk/DynamoDB_CLI_commands.md @@ -7,19 +7,40 @@ created: Saturday, June 22, 2024 # DynamoDB CLI commands -## Connecting to a local (Docker) DynamoDB instance +## Connecting to a local (Docker)/prod (AWS) 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. +seperate profiles for each (via `.aws/config` and `.aws/credentials`). + +When connecting to a local DB use the local profile 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. + +For example: ```sh -aws dynamodb list-tables --profile timetracking_dev --endpoint-url -http://localhost:800 +aws dynamodb list-tables \ +--profile timetracking_dev \ +--endpoint-url http://localhost:800 ``` -http://localhost:8000 +## Delete a table + +```sh +aws dynamodb delete-table \ +--profile timetracking_dev \ +--endpoint-url http://localhost:8000 \ +--table-name TableName +``` + +## Create table from JSON schema + +```sh +aws dynamodb create-table \ +--cli-input-json file://create-timeentries-table.json \ +--profile timetracking_dev \ +--endpoint-url http://localhost:8000 + +``` ## Related notes