diff --git a/dynamo.cloudformation.yaml b/dynamo.cloudformation.yaml index a888c8098..17655e6a0 100644 --- a/dynamo.cloudformation.yaml +++ b/dynamo.cloudformation.yaml @@ -85,6 +85,17 @@ Resources: StreamViewType: NEW_AND_OLD_IMAGES GlobalSecondaryIndexes: - IndexName: ios-endTimestamp-revalidation-index + KeySchema: + - AttributeName: subscriptionId + KeyType: HASH + - AttributeName: endTimestamp + KeyType: RANGE + Projection: + NonKeyAttributes: + - autoRenewing + - receipt + ProjectionType: INCLUDE + - IndexName: ios-endTimestamp-revalidation-index-with-platform KeySchema: - AttributeName: subscriptionId KeyType: HASH diff --git a/typescript/src/revalidate-receipts/appleRevalidateReceipts.ts b/typescript/src/revalidate-receipts/appleRevalidateReceipts.ts index 5af19e1ad..1912291e2 100644 --- a/typescript/src/revalidate-receipts/appleRevalidateReceipts.ts +++ b/typescript/src/revalidate-receipts/appleRevalidateReceipts.ts @@ -59,7 +59,7 @@ export async function handler(event: ScheduleEvent) { const queryScan = dynamoMapper.scan( EndTimeStampFilterSubscription, { - indexName: 'ios-endTimestamp-revalidation-index', + indexName: 'ios-endTimestamp-revalidation-index-with-platform', filter: filter });