Resources:
  CachedQueriesTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: ${self:custom.cachedQueriesTable}
        AttributeDefinitions:
          - AttributeName: ID
            AttributeType: S
          - AttributeName: sqlQuery
            AttributeType: S
        KeySchema:
          - AttributeName: ID
            KeyType: HASH
          - AttributeName: sqlQuery
            KeyType: RANGE
        StreamSpecification:
          StreamViewType: NEW_AND_OLD_IMAGES
        PointInTimeRecoverySpecification:
          PointInTimeRecoveryEnabled: true
        # Set the capacity to auto-scale
        BillingMode: PAY_PER_REQUEST