Contraction or what??

Destiny
So this morning I was woken up around 4 or so by a sharp pain that took my breath away, it was my stomach, top and bottom but mostly top right below my rib cage, and it lasted about 2 minutes or so, not long but it felt light an eternity. Then I rolled over to get it to stop and it didn't. Eventually it did. Then about 10 minutes later I had the same pain so I got up and walked to the kitchen to find some Tylenol and couldn't, so I walked back and sat down, it stopped again after about 2 minutes or so. Then about 10 minutes later I got another one but not as bad, since I'm sitting up and not laying down now I guess. I'm only 27W4D and have court at 9, but have to wake up at 7 to get there on time, so I can't do anything right now. But does these sound like contractions or just like random pregnancy pains. They feel like someone is squeezing my stomach and it gets hard to breathe when they happen. My family also had a history of preterm births, my mom had me at 26 weeks and my nana had twins at 27 weeks.