Tree diversity and composition in Amazonia are known to be strongly determined by the water supplied by precipitation. Nevertheless, within the same climatic regime, water availability is modulated by local topography and soil characteristics (hereafter referred to as local hydrological conditions), varying from saturated and poorly drained to well-drained and potentially dry areas. While these conditions may be expected to influence species distribution, the impacts of local hydrological conditions on tree diversity and composition remain poorly understood at the whole Amazon basin scale. Using a dataset of 443 1-ha non-flooded forest plots distributed across the basin, we investigate how local hydrological conditions influence 1) tree alpha diversity, 2) the community-weighted wood density mean (CWM-wd) – a proxy for hydraulic resistance and 3) tree species composition. We find that the effect of local hydrological conditions on tree diversity depends on climate, being more evident in wetter forests, where diversity increases towards locations with well-drained soils. CWM-wd increased towards better drained soils in Southern and Western Amazonia. Tree species composition changed along local soil hydrological gradients in Central-Eastern, Western and Southern Amazonia, and those changes were correlated with changes in the mean wood density of plots. Our results suggest that local hydrological gradients filter species, influencing the diversity and composition of Amazonian forests. Overall, this study shows that the effect of local hydrological conditions is pervasive, extending over wide Amazonian regions, and reinforces the importance of accounting for local topography and hydrology to better understand the likely response and resilience of forests to increased frequency of extreme climate events and rising temperatures.