Driven by the vision of cloud and edge computing as the 5th utility, a major challenge is the efficient resources management and pricing taking into account incentives and preferences of cloud/edge providers, users, and the system. In recent years, auction mechanism design has gained wide attention as a tool for addressing this challenge. Here existing surveys lack detailed studies in this area, hence this work presents a comprehensive survey on the state-of-the-art auction-based mechanisms in the field of cloud/edge computing. First, the problem statements and background are presented for cloud/edge computing and auction theory. This is followed by a collaboration model on the benefits of auction mechanism designs to cloud/edge computing. Next, various auction mechanisms in cloud computing are reviewed based upon the following aspects: (1) direction of bids-forward, reverse, and two-sided auctions, (2) the heterogeneity of resources-combinatorial auctions, (3) the number and types of adopted attributes in winner determination-multi-attribute auctions, (4) the setting of auction-offline, online, or sequential auctions, and (5) the interoperability among cloud providers-inter-clouds. For each aspect, existing studies are summarized along with their saliencies and drawbacks. Moreover, existing auction mechanisms in the context of edge computing are also presented, followed by existing challenges and research directions.INDEX TERMS Auction mechanism design, cloud computing, edge computing, resource management, resource pricing.