I’d like to add a TTL mechanism to some of my tables.
The solution needs to hold to both brand new tables and existing ones.
I’ve updated my YAML file according to [TimeToLiveSpecification] (AWS::DynamoDB::Table TimeToLiveSpecification - AWS CloudFormation)
serverless deploy --stage local and it ran with no errors
Here is the resource section of my file:
resources: Resources: CoffeeHouseTable: Type: AWS::DynamoDB::Table Properties: TableName: CoffeeHouseTable AttributeDefinitions: - AttributeName: PK AttributeType: S - AttributeName: SK AttributeType: S - AttributeName: GSI1PK AttributeType: S TimeToLiveSpecification: AttributeName: ttl Enabled: true KeySchema: - AttributeName: PK KeyType: HASH - AttributeName: SK KeyType: RANGE GlobalSecondaryIndexes: - IndexName: GSI1 KeySchema: - AttributeName: GSI1PK KeyType: HASH Projection: ProjectionType: 'ALL' ProvisionedThroughput: ReadCapacityUnits: 3 WriteCapacityUnits: 3 ProvisionedThroughput: ReadCapacityUnits: 3 WriteCapacityUnits: 3
Upon examining the META of the table I’ve found no mentioning of the TTL mechanism
After adding an item to my table (with the TTL attribute) which expired, no changes happened
I’ve also queried the item to see if in the response I get some mentioning about its pending deletion
I’m using serverless version:
Framework Core: 2.62.0
I’d really appreciate some assistance with the matter,