0
votes

I've deployed DynamoDB table using CloudFormation like this:

  exampleTable:
    Type: AWS::DynamoDB::Table
    Properties:
      BillingMode: PAY_PER_REQUEST
      KeySchema:
        - AttributeName: id
          KeyType: HASH
        - AttributeName: prop
          KeyType: RANGE
      TimeToLiveSpecification:
        AttributeName: foo
        Enabled: true

Changeing TTL attribute to bar successfully deployed, but changes does not reflect to dashboard.

https://docs.amazonaws.cn/en_us/amazondynamodb/latest/developerguide/time-to-live-ttl-before-you-start.html#time-to-live-ttl-before-you-start-notes says

You cannot reconfigure TTL to look for a different attribute. You must disable TTL, and then reenable TTL with the new attribute going forward.

Do I need to deploy 2 times even when using CloudFormation? (once for disabling TTL and once for enabling TTL with new attribute name)

1

1 Answers

1
votes

Do I need to deploy 2 times even when using CloudFormation?

Yes. The fact that you have to disable it first is explicitly stated in CloudFormation docs for AttributeName:

To update this property, you must first disable TTL then enable TTL with the new attribute name.