It worked for me I'm using node version 20
Go to AWS Amplify
From the side menu, under App settings, select Build settings
On the page, scroll down to Build image settings
Click Edit, an Edit build image settings modal will show up.
Under Build image section, click on dropdown and select Build image
enter image description here