A 28T cog will have a radius about 0.08" (2mm) larger than a 27T so if you have, or can adjust for, at least 2 mm clearance between the upper pulley and the current 27T cog, the 28 should work.
Generally, posters have reported that even a 30T cog works with most Shimano road rear derailleurs on most frames but, as operator noted, a close coupled derailleur hanger can keep it from working on some frames.