CI/CD Pipelines and Cost Optimization for Cloud Application Containers | AWS Certified Developer - Associate Exam Guide

Optimizing CI/CD Pipelines and Reducing Costs with Containerization

Prev Question Next Question

Question

As a cloud engineer, you have to use containers for packaging source code and dependencies into immutable artifacts to be deployed predictably to any environment.

What options are the most appropriate in this scenario to optimize the application CI/CD pipelines and reduce costs?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: A.

It is recommended to run Kubernetes Workloads on Amazon EC2 Spot Instances with Amazon EKS as a cost optimization practice.

Incorrect Answers:

Option B is incorrect because EC2 Spot instances are unused.

EC2 instances are available for less than the On-Demand price.

Option C is incorrect because you run Kubernetes Workloads with Amazon EKS.

Option D is incorrect because Amazon EMR is not a service for Kubernetes.

References:

https://go.aws/2Xs3XRW https://go.aws/2XEb8pY

In the given scenario, the most appropriate options to optimize the application CI/CD pipelines and reduce costs are A. Run Kubernetes Workloads on Amazon EC2 Spot Instances with Amazon EKS and B. Run Docker Workloads on Amazon EC2 On-Demand Instances with Amazon EKS.

Explanation:

Containers have become a popular way of packaging and deploying applications due to their flexibility, portability, and efficiency. They provide a lightweight and isolated environment that encapsulates an application and its dependencies. Containers make it easy to develop, test, and deploy applications across different environments, from development to production.

To run containers at scale, you need an orchestration system that can manage the deployment, scaling, and monitoring of containerized applications. Kubernetes is a popular open-source container orchestration system that automates the deployment, scaling, and management of containerized applications. Amazon Elastic Kubernetes Service (EKS) is a managed service that makes it easy to run Kubernetes on AWS.

Option A: Run Kubernetes Workloads on Amazon EC2 Spot Instances with Amazon EKS

Amazon EC2 Spot Instances are spare compute capacity in the AWS cloud that can be purchased at a discount of up to 90% compared to On-Demand pricing. Spot Instances can be interrupted with a two-minute notification when the capacity is needed back by AWS. However, if the workload is fault-tolerant and can handle interruptions, using Spot Instances can be a cost-effective option. Kubernetes makes it easy to run workloads on Spot Instances by automatically rescheduling the workload on another node when the node is terminated.

Amazon EKS supports running Kubernetes workloads on Spot Instances, which can reduce the cost of running containerized applications by up to 90%. Using Spot Instances can help optimize the CI/CD pipelines by reducing the cost of the infrastructure required for building, testing, and deploying the applications. Spot Instances can also be used to run non-production workloads, such as development and testing environments, to further reduce costs.

Option B: Run Docker Workloads on Amazon EC2 On-Demand Instances with Amazon EKS

Amazon EC2 On-Demand Instances are virtual servers that are billed by the hour, with no long-term commitments or upfront payments. On-Demand Instances provide a predictable and stable pricing model, with the ability to scale up and down as needed. Amazon EKS supports running Docker workloads on On-Demand Instances, which provides a cost-effective and scalable option for running containerized applications.

Using On-Demand Instances can help optimize the CI/CD pipelines by providing a predictable and stable infrastructure for building, testing, and deploying the applications. On-Demand Instances can also be used to run production workloads that require high availability and reliability.

Option C: Run Kubernetes Workloads on Amazon EC2 On-Demand Instances with Amazon ECS

Amazon Elastic Container Service (ECS) is a managed container orchestration service that supports running Docker containers on EC2 instances. ECS provides a scalable and secure platform for running containerized applications, with features such as automatic scaling, load balancing, and service discovery.

However, Option C is not the most appropriate option in this scenario, as it suggests running Kubernetes workloads on ECS. While ECS supports running Kubernetes workloads using Kubernetes on ECS (KoE), it is not as mature and feature-rich as Amazon EKS. Moreover, using ECS may require more configuration and management overhead compared to using EKS.

Option D: Run Docker Workloads on Amazon EC2 Spot Instances with Amazon EMR and Auto Scaling Groups

Amazon EMR (Elastic MapReduce) is a managed big data platform that makes it easy to process large amounts of data using open-source tools such as Apache Hadoop and Apache Spark. While EMR supports running Docker containers on EC2 instances, it is not the most appropriate option in this scenario, as