The Industry 4.0 promotes the use of Information and Communication Technologies (ICT) in manufacturing processes to obtain customized products satisfying demanding needs of new consumers. The Industry 4.0 approach transforms the traditional pyramid model of automation to a network model of interconnected services. This new model allows the creation of ecosystems to make the production process more flexible through connecting systems and sharing data. In this context, cloud computing and big data are critical technologies for leveraging the approach. Thus, this paper analyzes cloud computing and big data under the lenses of two leading reference architectures for implementing Industry 4.0: 1) the Industrial Internet Reference Architecture (IIRA) of the Internet Consortium (IIC), and 2) the Reference Architecture Model for Industry 4.0 (RAMI 4.0). A main contribution of this paper is discussing needs, benefits, and challenges of applying cloud computing and big data in the Industry 4.0.