5GC - How AMF will find the best UPF/SMF?

How AMF will find the best UPF/SMF ?
Still using DNS or replaced by NRF ?

How AMF will find old AMF ?