Proteins can be synthesized from sugar as a carbon source. We know this because there are bacteria that can survive and reproduce with no nutrients in their environment other than glucose.
In fact you don’t even need sugar. Carbon dioxide and water alone are sufficient. Plants produce their entire biomass using nothing but carbon dioxide, water, sunlight and trace elements from soil.
Amino acids and proteins don’t occur without life. Living creatures have the ability to synthesize all amino acids and proteins from simpler compounds.