-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Description
Hi AWS CDK,
First of all, I am happy to see this project :)
As DynamoDB user, it would be great to support GSI and LSI through DynamoDB Table. Currently, a low-level approach is required as follows if GSI or LSI is needed, which makes high-level methods, such as addPartitionKey and addSortKey, less useful.
new dynamodb.cloudformation.TableResource(this, 'cdk', {
attributeDefinitions: [
{
attributeName: 'foo',
attributeType: 'S'
},
{
attributeName: 'bar',
attributeType: 'S'
}
],
tableName: 'cdk',
keySchema: [
{
attributeName: 'foo',
keyType: 'HASH'
},
{
attributeName: 'bar',
keyType: 'RANGE'
}
],
provisionedThroughput: {
readCapacityUnits: 10,
writeCapacityUnits: 10
},
globalSecondaryIndexes: [
{
indexName: 'cdk-gsi',
keySchema: [
{
attributeName: 'bar',
keyType: 'HASH'
}
],
projection: {
projectionType: 'ALL'
},
provisionedThroughput: {
readCapacityUnits: 10,
writeCapacityUnits: 10
}
}
]
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels