It depends whether you will be on the coast or not, but to be safe, it is always recommended to pack clothing in layers to accommodate all temperatures.
Got with layers. Pack long shorts as well as trousers and jeans. Include a jackets with a zip-out lining. Your needs will depend on your activities and the altitude.
In Late August, for many areas of Peru, the temperature is known to drop considerably at night and be warm in the day time. Therefore, it would be best to take a mixture of winter and summer clothing.
Keep in mind that Late August is early spring in Peru. If you're going to the highlands, pack a sweater. If you're going to the beach bring a bathing suit.