create_lsi
Enables creation of a local secondary index during DynamoDB table setup, specifying keys, types, projection, and capacity units for efficient data querying.
Instructions
Creates a local secondary index on a table (must be done during table creation)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
indexName | Yes | Name of the new index | |
nonKeyAttributes | No | Non-key attributes to project (optional) | |
partitionKey | Yes | Partition key for the table | |
partitionKeyType | Yes | Type of partition key | |
projectionType | Yes | Type of projection | |
readCapacity | No | Provisioned read capacity units (optional, default: 5) | |
sortKey | Yes | Sort key for the index | |
sortKeyType | Yes | Type of sort key | |
tableName | Yes | Name of the table | |
writeCapacity | No | Provisioned write capacity units (optional, default: 5) |
Input Schema (JSON Schema)
{
"properties": {
"indexName": {
"description": "Name of the new index",
"type": "string"
},
"nonKeyAttributes": {
"description": "Non-key attributes to project (optional)",
"items": {
"type": "string"
},
"type": "array"
},
"partitionKey": {
"description": "Partition key for the table",
"type": "string"
},
"partitionKeyType": {
"description": "Type of partition key",
"enum": [
"S",
"N",
"B"
],
"type": "string"
},
"projectionType": {
"description": "Type of projection",
"enum": [
"ALL",
"KEYS_ONLY",
"INCLUDE"
],
"type": "string"
},
"readCapacity": {
"description": "Provisioned read capacity units (optional, default: 5)",
"type": "number"
},
"sortKey": {
"description": "Sort key for the index",
"type": "string"
},
"sortKeyType": {
"description": "Type of sort key",
"enum": [
"S",
"N",
"B"
],
"type": "string"
},
"tableName": {
"description": "Name of the table",
"type": "string"
},
"writeCapacity": {
"description": "Provisioned write capacity units (optional, default: 5)",
"type": "number"
}
},
"required": [
"tableName",
"indexName",
"partitionKey",
"partitionKeyType",
"sortKey",
"sortKeyType",
"projectionType"
],
"type": "object"
}