github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/istorage/amazondb/README.md (about) 1 # Driver for AWS DynamoDB storage. 2 3 ## Overview 4 5 This package provides a driver for AWS DynamoDB storage as implementation of interfaces `istorage.IAppStorage` and `istorage.IAppStorageFactory`. 6 7 8 ## Configuration 9 10 To run DynamoDB locally, use the following command: 11 12 ```bash 13 docker run -p 8000:8000 -e AWS_REGION={AWS_REGION} -e AWS_ACCESS_KEY_ID={ACESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY={SECRET_ACCESS_KEY} amazon/dynamodb-local 14 ``` 15 16 To connect to the local instance of DynamoDB in go code configure the session as follows: 17 18 ```go 19 params := DynamoDBParams{ 20 EndpointURL: "http://127.0.0.1:8000", // or your endpoint 21 Region: "eu-west-1", // or your region 22 AccessKeyID: "local", // or your access key 23 SecretAccessKey: "local", // or your secret key 24 SessionToken: "", 25 } 26 ``` 27 28 ## KeySpace 29 30 AWS DynamoDB does not have a concept of KeySpace. Keyspaces are emulated using tables with names `<keyspaceName>.values` 31 32 ## Notes 33 34 Partition key and sort key attributes of base tables continue to require non-empty values for all data types, including String and Binary. To make a workaround `byte(0)` is prefixed to each sort key value. See `prefixZero()` and `unprefixZero() functions.