Should compost be in sun or shade is one of the most frequently asked questions. A good balance of sun and shade is best for the reasons mentioned at the top of this article. However, if you only have one extreme or the other to choose from, choose the shade.
The reason being, heat from the sun is not the primary heat source in the decomposition process - the busy microbes are. The shade will also prevent water evaporation and keep your compost bin from drying out too fast.