Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xch4z/dynamodb-json-schema
Generate dynamodb table schema from json schema
https://github.com/0xch4z/dynamodb-json-schema
dynamodb jsonschema
Last synced: about 2 months ago
JSON representation
Generate dynamodb table schema from json schema
- Host: GitHub
- URL: https://github.com/0xch4z/dynamodb-json-schema
- Owner: 0xch4z
- Created: 2019-07-04T04:26:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T00:34:34.000Z (over 4 years ago)
- Last Synced: 2024-12-12T05:34:14.991Z (about 2 months ago)
- Topics: dynamodb, jsonschema
- Language: TypeScript
- Size: 430 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dynamodb-json-schema [![Build Status](https://travis-ci.org/charliekenney23/dynamodb-json-schema.svg?branch=master)](https://travis-ci.org/charliekenney23/dynamodb-json-schema)
> Generate dynamodb table schema from json schema
## Example Usage
```ts
import * as fs from "fs";
import { getTableSchema } from "dynamodb-json-schema";const USER_SCHEMA = JSON.parse(fs.readFileSync("User.json", "utf8"));
const tableSchema = getTableSchema({
tableName: "users-table",
hashKey: "id",
itemSchema: USER_SCHEMA
});/*
=> {
"TableName": "users-table",
"KeySchema": [{
"AttributeName": "id",
"AttributeType": "HASH"
}],
"AttributeDefinitions": [{
"AttributeName": "id",
"AttributeType": "S"
}]
}
*/
```