From f75f2784bd84919aa912166e64d66b72d070c6e5 Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:20:09 -0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20use=20on-demand=20capacity?= =?UTF-8?q?=20so=20we=20don't=20go=20broke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/bronya.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/bronya.config.ts b/apps/api/bronya.config.ts index 6bd99da6..3cb65887 100644 --- a/apps/api/bronya.config.ts +++ b/apps/api/bronya.config.ts @@ -8,7 +8,7 @@ import { PrismaClient } from "@libs/db"; import { logger, warmingRequestBody } from "@libs/lambda"; import { LambdaIntegration, ResponseType } from "aws-cdk-lib/aws-apigateway"; import { Certificate } from "aws-cdk-lib/aws-certificatemanager"; -import { AttributeType, Table } from "aws-cdk-lib/aws-dynamodb"; +import { AttributeType, BillingMode, Table } from "aws-cdk-lib/aws-dynamodb"; import { Rule, RuleTargetInput, Schedule } from "aws-cdk-lib/aws-events"; import { LambdaFunction } from "aws-cdk-lib/aws-events-targets"; import { @@ -243,6 +243,7 @@ class ApiStack extends Stack { this.cache = new Table(this, `${id}-cache`, { partitionKey: { name: "cacheKey", type: AttributeType.STRING }, timeToLiveAttribute: "expireAt", + billingMode: BillingMode.PAY_PER_REQUEST, }); } }