With the advancement of additive manufacturing (AM), or 3D printing technology, manufacturing industries are driving towards Industry 4.0 for dynamic changed in customer experience, data-driven smart systems, and optimized production processes. This has pushed substantial innovation in cyber-physical systems (CPS) through the integration of sensors, Internet-of-things (IoT), cloud computing, and data analytics leading to the process of digitization. However, computer-aided design (CAD) is used to generate G codes for different process parameters to input to the 3D printer. To automate the whole process, in this study, a customer-driven CPS framework is developed to utilize customer requirement data directly from the website. A cloud platform, Microsoft Azure, is used to send that data to the fused diffusion modelling (FDM)-based 3D printer for the automatic printing process. A machine learning algorithm, the multi-layer perceptron (MLP) neural network model, has been utilized for optimizing the process parameters in the cloud. For cloud-to-machine interaction, a Raspberry Pi is used to get access from the Azure IoT hub and machine learning studio, where the generated algorithm is automatically evaluated and determines the most suitable value. Moreover, the CPS system is used to improve product quality through the synchronization of CAD model inputs from the cloud platform. Therefore, the customer’s desired product will be available with minimum waste, less human monitoring, and less human interaction. The system contributes to the insight of developing a cloud-based digitized, automatic, remote system merging Industry 4.0 technologies to bring flexibility, agility, and automation to AM processes.