Enhanced processing power in the cloud allows constrained devices to offload costly computations: for instance, complex data analytics tasks can be computed by remote servers. Remote execution calls for a new compression paradigm that optimizes performance on the analytics task within a rate constraint, instead of the traditional rate-distortion framework which focuses on source reconstruction. This paper considers a simple binary hypothesis testing scenario where the resource constrained client (transmitter) performs fixed-length single-shot compression on data sampled from one of two distributions; the server (receiver) performs a hypothesis test on multiple received samples to determine the correct source distribution. To this end, the task-aware compression problem is formulated as finding the optimal source coder that maximizes the asymptotic error performance of the hypothesis test on the server side under a rate constraint. A new source coding strategy based on a greedy optimization procedure is proposed and it is shown that that the proposed compression scheme outperforms universal fixed-length single-shot coding scheme for a range of rate constraints.