Fetching details from the dictionary...

substitute for ...
「代わり」 has another reading with different meanings.
コーヒー代わりにココアを飲む。
I drink cocoa as a coffee substitute.
お茶代わりに水を飲んだ。
I drank water instead of tea.
砂糖代わりにはちみつを使った。
I used honey as a substitute for sugar.