Cost of goods sold, or COGS, are the direct costs of selling, packaging, and otherwise delivering a product. In a traditional retail business, for example, the materials, packaging, and delivery costs of selling a coffee mug are COGS. COGS let businesses know how much revenue is left to deal with other costs. Similarly, COS or Cost of Service are the direct costs incurred related to providing the subscription service.
In a Subscription as a Service (SaaS) business, without a tangible object being sold, is a little harder to figure out. The most straightforward way to look at it is to consider your expenses and determine which are critical to being able to offer the service to your clients. Without paying those bills, you would not have a subscription service, thus they are COGS. For some businesses, this could include the hosting fees for the customer platform, ongoing customer support for existing customers, or merchant processing fees for accepting credit card payments. However, expenses related to R&D, engineering, sales, or other non-direct expenses would likely not be considered as SaaS COGS.