From cb928515dcf3ef28aec58311e71aa91aba408097 Mon Sep 17 00:00:00 2001 From: Jeremy Olexa Date: Mon, 25 Sep 2017 09:08:16 -0500 Subject: [PATCH] Add TTL to DynamoDB table --- deployment.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deployment.yml b/deployment.yml index bc686f6..08fdc7e 100644 --- a/deployment.yml +++ b/deployment.yml @@ -61,14 +61,22 @@ Resources: - !GetAtt ConfigTable.Arn ConfigTable: - Type: AWS::Serverless::SimpleTable + Type: "AWS::DynamoDB::Table" Properties: - PrimaryKey: - Name: schedule - Type: String + AttributeDefinitions: + - + AttributeName: "schedule" + AttributeType: "S" + KeySchema: + - + AttributeName: "schedule" + KeyType: "HASH" ProvisionedThroughput: ReadCapacityUnits: 1 WriteCapacityUnits: 1 + TimeToLiveSpecification: + AttributeName: expiretime + Enabled: true ChatTopicFunction: Type: AWS::Serverless::Function