The Ghost Brigades by John Scalzi

In a universe where humanity is at constant war with alien species, the story follows the elite soldiers known as the Special Forces, or "Ghost Brigades," who are created from the DNA of deceased individuals. These soldiers are engineered to be the perfect warriors, devoid of personal memories and emotions. When a scientist betrays humanity by defecting to an enemy race, the Ghost Brigades are tasked with uncovering his motives and stopping a potential catastrophe. As they delve deeper into the mission, questions about identity, consciousness, and the essence of humanity arise, challenging the soldiers to confront their own existence and purpose.