Beamforming Design for RIS-Aided AF Relay Networks