override.ts
[...] resources.dynamoDBTable.billingMode = 'PAY_PER_REQUEST';
resources.dynamoDBTable.tags.setTag('tableName', tableName);
resources.dynamoDBTable.globalSecondaryIndexes = [
{
indexName: 'byApexAccount',
partitionKey: {
name: 'apexAccount',
type: AttributeType.BINARY
},
sortKey: {
name: 'SK',
type: AttributeType.BINARY
}
},
{
indexName: 'byCreatedAt',
partitionKey: {
name: 'PK',
type: AttributeType.BINARY
},
sortKey: {
name: 'createdAt',
type: AttributeType.BINARY
}
},
{
indexName: 'byAltId',
partitionKey: {
name: 'altId',
type: AttributeType.BINARY
}
},
{
indexName: 'byId',
partitionKey: {
name: 'SK',
type: AttributeType.BINARY
}
},
{
indexName: 'byEntityType',
partitionKey: {
name: 'entityType',
type: AttributeType.BINARY
},
sortKey: {
name: 'SK',
type: AttributeType.BINARY
}
},
{
indexName: 'byEntityQuery',
partitionKey: {
name: 'entityType',
type: AttributeType.BINARY
},
sortKey: {
name: 'entityQuery',
type: AttributeType.BINARY
}
},
{
indexName: 'byEntityStatus',
partitionKey: {
name: 'entityType',
type: AttributeType.BINARY
},
sortKey: {
name: 'entityStatus',
type: AttributeType.BINARY
}
}
];
}