Autosave: 2024-06-23 12:30:05
This commit is contained in:
parent
35f3a8ac48
commit
c0876f7562
3 changed files with 33 additions and 7 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
|
@ -7,17 +7,21 @@ 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
|
||||
```
|
||||
|
||||
## Delete a table
|
||||
|
|
22
zk/DynamoDB_SDK_commands.md
Normal file
22
zk/DynamoDB_SDK_commands.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
id: 8b6h
|
||||
title: DynamoDB SDK commands
|
||||
tags: [AWS, databases, dynamodb]
|
||||
created: Sunday, June 23, 2024
|
||||
---
|
||||
|
||||
# DynamoDB SDK commands
|
||||
|
||||
The following commands are for using `$aws-sdk/client-dynamodb` (the JS SDK).
|
||||
|
||||
## Create client
|
||||
|
||||
```js
|
||||
const params = {
|
||||
region: "eu-west-2",
|
||||
accessKeyId: process.env.ACCESS_KEY_ID,
|
||||
secretAccessKey: process.env.ACCESS_KEY_ID,
|
||||
};
|
||||
```
|
||||
|
||||
## Related notes
|
Loading…
Add table
Reference in a new issue