{
  "slug": "json-to-dynamodb-batch",
  "name": "gizza-ai/json-to-dynamodb-batch",
  "version": "0.1.0",
  "title": "JSON to DynamoDB BatchWriteItem — Convert JSON to a Batch Payload — gizza.ai",
  "description": "Convert a JSON array of objects into a DynamoDB BatchWriteItem request payload with typed AttributeValues. Put or delete, pretty or compact, up to 25 items.",
  "tags": [
    "json to dynamodb",
    "dynamodb batchwriteitem",
    "dynamodb batch write",
    "dynamodb attributevalue",
    "json to dynamodb json",
    "dynamodb put request",
    "dynamodb import json",
    "aws cli dynamodb"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/json-to-dynamodb-batch/",
    "markdown": "https://gizza.ai/tools/json-to-dynamodb-batch/index.md",
    "descriptor": "https://gizza.ai/tools/json-to-dynamodb-batch/tool.json",
    "deep_link_example": "https://gizza.ai/tools/json-to-dynamodb-batch/?json=%5B%0A%20%20%7B%20%22id%22%3A%20%22user%231%22%2C%20%22name%22%3A%20%22Ada%22%2C%20%22age%22%3A%2036%2C%20%22active%22%3A%20true%20%7D%2C%0A%20%20%7B%20%22id%22%3A%20%22user%232%22%2C%20%22name%22%3A%20%22Grace%22%2C%20%22age%22%3A%2045%2C%20%22active%22%3A%20false%20%7D%0A%5D&table_name=Users&operation=put&pretty=true"
  },
  "cli": "gizza tool json-to-dynamodb-batch '[\n  { \"id\": \"user#1\", \"name\": \"Ada\", \"age\": 36, \"active\": true },\n  { \"id\": \"user#2\", \"name\": \"Grace\", \"age\": 45, \"active\": false }\n]' 'table_name=Users'",
  "tool": {
    "description": "Convert a JSON array of objects into a DynamoDB BatchWriteItem request payload. Emits { \"RequestItems\": { table: [ ... ] } } with each object mapped to typed AttributeValues (S, N, BOOL, NULL, L, M). Choose put (PutRequest/Item) or delete (DeleteRequest/Key), and pretty or compact output. Numbers keep their exact JSON spelling. Errors on invalid JSON, a non-array root, a non-object item, an empty table name, or more than 25 items (the DynamoDB batch limit).",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "json": {
          "description": "JSON array of objects to convert. Each object becomes one write request (max 25 per DynamoDB BatchWriteItem call).",
          "type": "string"
        },
        "operation": {
          "default": "put",
          "description": "put emits PutRequest/Item entries; delete emits DeleteRequest/Key entries (objects should hold only key attributes).",
          "enum": [
            "put",
            "delete"
          ],
          "type": "string"
        },
        "pretty": {
          "default": true,
          "description": "Pretty-print the JSON output. Set false for compact single-line output.",
          "type": "boolean"
        },
        "table_name": {
          "description": "Target DynamoDB table name that the write requests are keyed under.",
          "type": "string"
        }
      },
      "required": [
        "json",
        "table_name"
      ],
      "type": "object"
    }
  }
}