Microbial communities associated with host organisms can play a wide range of important functions for their host. Host-associated microbial communities are influenced by various factors including host phylogeny, diet and habitat. In ants, some genera have been extensively studied for their bacterial communities and the benefits provided by their symbionts, particularly in terms of development and nutritional supplementation. However, eukaryote communities associated with ants are still poorly understood. Using 16S rRNA and 18S rRNA amplicon sequencing and qPCR, this study examined the structure of microbial communities associated with a wide taxonomic range of Amazonian ants collected in a primary rainforest and in an urban environment. We investigated the different roles of host diet, nesting mode, phylogeny and habitat on structuring microbial communities. Our results reveal that (1) diet and nesting mode structure bacterial communities but only nesting mode structures eukaryote communities, (2) host phylogeny is not correlated with microbial diversity, (3) long-term associations between ants and specific symbionts results in very conserved bacterial communities, and (4) habitat does not structure microbial communities.