Enhanced recovery after thoracic surgery (ERATS) protocols use a combination of analgesics for pain control. We investigated the effect of non-steroidal analgesic drugs (NSAIDs) on pain control by comparing patient levels and opioid requirements after robotic pulmonary resections. We retrospectively analyzed our prospectively maintained institutional database for elective, opioid-naïve robotic thoracoscopic pulmonary resections. All patients received postoperative NSAIDs unless contraindicated or at the discretion of the attending surgeons. Our original protocol (ERATS-V1) was modified to optimize opioid-sparing effect without affecting pain control (ERATS-V2). Demographics, operative outcomes, and postoperative opioid dispensed [morphine milligram equivalent (MME)] were collected. A total of 491 patients (147 ERATS-V1; 344 ERATS-V2) were included in this study. There was no difference in patient characteristics or operative outcomes between ERATS cohorts. Protocol optimization was associated with a 2- to 10-fold reduction of postoperative opioid use without compromising pain control. In ERATS-V1 cohort, there was no difference in pain levels and opioid requirements with NSAID usage. In ERATS-V2 cohort, while pain levels were similar, higher in-hospital opioid consumption was observed in no-NSAID subgroup {MME: 20.5 [interquartile range (IQR), 4.8-40.5] vs. 12.0 (IQR, 2.0-32.2), P=0.0096, schedule II: 14.2 (IQR, 3.0-36.4) vs. 6.8 (IQR, 1.4-24.0), P=0.012} as well as total postoperative schedule II opioid requirement [17.8 (IQR, 3.0-43.5) vs. 8.8 (IQR, 1.5-30), P=0.032]. The opioid-sparing effect of NSAIDs was observed only in optimized ERATS patients. Modifications of our pre-existing ERATS was associated with a significant reduction of opioid consumption without affecting pain levels. This revealed the role of NSAIDs in postoperative pain management otherwise masked by excessive opioids use.