Configure DynamoDB table streams in serverless.yaml

resources:
  Resources:
    CommandsDynamoDbTable:
      Type: 'AWS::DynamoDB::Table'
      Properties:
        AttributeDefinitions:
          -
            AttributeName: microservice
            AttributeType: S
        KeySchema:
          -
            AttributeName: microservice
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: ${self:provider.environment.COMMANDS_TABLE}
        # add stream configuration (here stream will receive only new record value)
        StreamSpecification:
          StreamViewType: NEW_IMAGE