Add Session Table

MarukiStack.ts
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export function MarukiStack({ stack }: StackContext) {
  const marukiDataTable = new Table(stack, "MarukiTable", {
    // Snip for Brevity
  });

  const sessionTable = new Table(stack, "MarukiSessionTable", {
    fields: {
      pk: "string",
      sk: "string",
      gsi1pk: "string",
      gsi1sk: "string",
      ttl: "number",
    },
    primaryIndex: { partitionKey: "pk", sortKey: "sk" },
    globalIndexes: {
      GSI1: { partitionKey: "gsi1pk", sortKey: "gsi1sk"},
    },
    timeToLiveAttribute: "expiry",
  });
D
Image of Dylan Lacey
Dylan Lacey
@dylanlacey
powered byLogosnappify