Skip to content

dynamodb-toolbox/dynamodb-toolshack

Folders and files

NameName
Last commit message
Last commit date
Dec 30, 2024
Dec 23, 2024
Feb 4, 2025
Dec 23, 2024
Dec 30, 2024
Dec 23, 2024
Dec 23, 2024
Dec 23, 2024
Jan 24, 2025
Feb 4, 2025
Feb 4, 2025
Dec 23, 2024
Dec 23, 2024
Dec 23, 2024
Dec 23, 2024

Repository files navigation

DynamoDB-Toolshack

Official actions to synchronize code from DynamoDB-Toolbox and DynamoDB-Toolshack.

Installation

# npm
npm add dynamodb-toolshack

# yarn
npm add dynamodb-toolshack

# pnpm
pnpm add dynamodb-toolshack

Note that DynamoDB-Toolbox is required as a peer dependency.

Synchronizer

The Synchronizer is a DynamoDB-Toolbox Table Action to synchronize a Table and its Entities to DynamoDB-Toolshack:

import { Synchronizer } from 'dynamodb-toolshack'

await MyTable.build(Synchronizer)
  .entities(MyEntity, AnotherEntity, ...)
  // πŸ‘‡ AWS Config (required)
  .awsConfig({
    awsAccountId: '398259209128', // AWS AccountId
    awsRegion: 'us-east-1' // AWS Region
  })
  // πŸ‘‡ Assign an access role (optional)
  .accessRole({
    roleName: 'DynamoDBToolshackAccountAccessRole',
    description: 'Optional role description'
  })
  // πŸ‘‡ Choose DynamoDB-Toolshack metadata (optional)
  .metadata({
    awsAccountTitle: 'Dev',
    // πŸ‘‡ https://ui.shadcn.com/colors
    awsAccountColor: 'blue',
    awsAccountDescription: 'Account for development purposes',
    // πŸ‘‡ https://lucide.dev/icons/
    tableIcon: 'database-zap',
    tableTitle: 'Super Table',
    tableDescription: 'An Awesome Table for development use',
    entities: {
      [MyEntity.name]: {
        // πŸ‘‡ https://lucide.dev/icons/
        entityIcon: 'cat',
        entityTitle: 'Super Entity',
        entityDescription: 'An Awesome Entity for development use'
      },
      ...
    }
  })
  .sync({
    // πŸ‘‡ https://app.dynamodb-toolshack.com/api-keys
    apiKey: '<API_KEY>',
    // πŸ‘‡ Keep only specified entities for the Table (optional, `false` by default)
    deleteUnknownEntities: true,
    // πŸ‘‡ Override Table instance name (optional)
    tableName: 'my-table-name'
  })

Please read the Reference for more details on the DynamoDB-Toolshack API.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published