Skip to content

Instantly share code, notes, and snippets.

@kieronjmckenna
Created November 11, 2024 20:38
Setup DynamoDB
import { Bucket, StackContext, Table } from "sst/constructs";
export function Dynamo({ stack }: StackContext) {
const table = new Table(stack, "dynamo", {
fields: {
PK: "string",
SK: "string",
},
primaryIndex: {
partitionKey: "PK",
sortKey: "SK",
},
timeToLiveAttribute: "TTL",
});
return {
table,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment