AWS DynamoDB integration for Gravity workflow system - includes put, fetch, and service operations
npm install @gravityai-dev/aws-dynamodbAWS DynamoDB integration plugin for the Gravity workflow system. Provides nodes for database operations including put, fetch, and service operations.
- DynamoDB: Put records to DynamoDB tables with conditional expressions
- DynamoDBFetch: Fetch records by primary/sort key with null handling
- DynamoDBService: Service node providing NoSQL operations for other nodes
- Full AWS SDK v3 integration with document client
- Client caching for performance optimization
- Comprehensive error handling and logging
``bash`
npm install @gravityai-dev/aws-dynamodb
Uploads a record to an AWS DynamoDB table with optional conditional expressions.
Inputs:
- signal: Record data to upload (can override config record)
Outputs:
- success: Whether the upload was successfulitemId
- : ID of the uploaded item (if available)
Configuration:
- tableName: Name of the DynamoDB tablerecord
- : JS Code to transform dataconditionExpression
- : Optional condition for the put operationexpressionAttributeNames
- : Substitution tokens for attribute namesexpressionAttributeValues
- : Values for expression substitution
Fetches a record from AWS DynamoDB table by key, returns null if not found.
Inputs:
- signal: Input object containing key values
Outputs:
- output: The fetched record or null if not foundfound
- : Whether the record was found
Configuration:
- tableName: The name of the DynamoDB tableprimaryKey
- : The field name for the primary key (partition key)sortKey
- : The field name for the sort key (optional)
Provides DynamoDB operations as a service for other nodes. Marked as a service node.
Service Connectors:
- nosqlService: Provides NoSQL database operations
- Methods: put, get, query, update, delete, batchGet, batchWrite
Configuration:
- region: AWS region for DynamoDBdefaultTable
- : Default table name (can be overridden per operation)
Requires AWS credentials with the following fields:
- accessKeyId: Your AWS access key IDsecretAccessKey
- : Your AWS secret access keyregion
- : AWS region (e.g., us-east-1)
1. Add DynamoDB node to put records to a table
2. Use DynamoDBFetch to retrieve records by key
3. Connect DynamoDBService for advanced operations
4. Configure conditional expressions for data integrity
`bashInstall dependencies
npm install
MIT