import { RemovalPolicy } from 'aws-cdk-lib';
import { AttributeType, BillingMode, Table } from 'aws-cdk-lib/aws-dynamodb';
import { Construct } from 'constructs';
export class DynamodbTable extends Table {
constructor(scope: Construct, id: string) {
super(scope, id, {
billingMode: BillingMode.PAY_PER_REQUEST,
removalPolicy: RemovalPolicy.RETAIN,
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: true,
},
partitionKey: {
name: 'pk',
type: AttributeType.STRING,
},
sortKey: {
name: 'sk',
type: AttributeType.STRING,
},
tableName: 'serverless-mcp',
timeToLiveAttribute: 'expires',
});
}
}