With the increase in the adoption of Cloud computing and big data processing systems, a common way to deploy analytics workloads is to acquire on-demand resources in a Cloud environment whenever the workloads need to execute. Public Cloud providers offer numerous infrastructure choices to Cloud users. For example, the number of different Virtual Machine (VM) instances offered by the Cloud providers has been steadily increasing, now numbering in dozens. This enables Cloud users to have access to the type of instance that fits their use case. However, this blessing can also be a curse since selecting the right resources is often not straightforward. When executing analytics workloads in the Cloud, ensuring the allocation of the right resources is paramount to achieve cost efficiency and satisfy strict service-level objectives (SLOs) on job completion times. This requires users to decide the number of instances (VMs) and type of instances for their deployments (together forming a Cloud configuration). In addition, the software platforms for big data processing have system parameters that need to be appropriately set. The choice of these cloud configurations and system parameter values dictate the performance and cost of the whole deployment. This thesis aims to reduce the decision burden on the users when deploying workloads in the Cloud. Our primary focus is to allow users to concentrate on defining the performance objectives rather than determining the resource allocation for their Cloud workloads. Specifically, we investigate ways to automatically determine configurations for Cloud workloads given user-specified performance and cost objectives. These workloads include jobs running on batch and stream processing systems and serverless functions. The configurations under consideration in this thesis include cloud configurations and system parameters. More concretely, in this thesis, we discuss automatic Cloud configuration optimization in two contexts. First, for distributed batch data processing systems, a Cloud configuration is the number of VMs and the type of VMs to use for deployment of the workload. Second, for serverless systems, a Cloud configuration is the type of VM instance, CPU share, and memory share given to a serverless function. System parameters, in turn, are the parameters of the distributed software system being used to run analytics workloads. These parameters include parallelism levels, buffer and queue sizes, etc. In this thesis, we perform system parameter tuning for Apache Storm. However, the methodology applies to other similar distributed stream processing systems as well. To attain this broad set of goals, we present four research pillars that comprise this thesis. First, we discuss an empirical evaluation of several popular black-box optimization algorithms in the context of automatic cloud configuration and determine the best choice under different conditions. Next, we propose Vanir, a framework to automatically optimize cloud configurations for multi-framework analytics clusters while reducing the number of offline benchmarking runs required. Third, we discuss the benefits of decoupling memory and CPU resources and enabling the use of different instance types for serverless functions, showing that black-box optimization algorithms can handle the resulting increase in resource configuration options. Lastly, we propose and evaluate three methods for automatically tuning the system parameters of stream processing systems to efficiently deploy stream processing workloads in the Cloud.