Ellerman bombs (EBs) are small-scale intense brightenings in H$alpha$ wing images, which are generally believed to be signatures of magnetic reconnection events around the temperature minimum region of the solar atmosphere. They have a flame-like morphology when observed near the solar limb. Recent observations from the Interface Region Imaging Spectrograph (IRIS) reveal another type of small-scale reconnection events, termed UV bursts, in the lower atmosphere. Though previous observations have shown a clear coincidence of some UV bursts and EBs, the exact relationship between these two phenomena is still under debate. We investigate the spatial and temporal relationship between flame-like EBs and UV bursts using joint near-limb observations between the 1.6--meter Goode Solar Telescope (GST) and IRIS. In total 161 EBs have been identified from the GST observations, and 20 of them reveal signatures of UV bursts in the IRIS images. Interestingly, we find that these UV bursts have a tendency to appear at the upper parts of their associated flame-like EBs. The intensity variations of most EB-related UV bursts and their corresponding EBs match well. Our results suggest that these UV bursts and EBs are likely formed at different heights during a common reconnection process.