Load Balancers & Auto Scaling Groups Exam Questions. AWS Solutions Architect Associate Complete Course

As we did with the EC2 chapter, the last chapter about Load Balancers & Auto Scaling Groups also contains another chapter with typical exam questions along with its solutions to help you prepare for the certification. Let’s start with it!

AWS ELB & ASG Exam Questions.
AWS ELB & ASG Exam Questions.

Remember that you can find all the chapters from the course in the following link:

QUESTIONS & ANSWERS

Which type of Elastic Load Balancer uses the TCP protocol?

  1. Network Load Balancer (NLB).
  2. Application Load Balancer (ALB).
  3. Classic Load Balancer (CLB).
  4. Routing Load Balancer (RLB).

Solution: 1.

Which AWS service can automatically scale the number of instances that your application have?

  1. Amazon Elastic Load Balancer.
  2. Amazon CloudFront.
  3. Amazon EC2 Auto Scaling.
  4. AWS Athena.

Solution: 3.

We are designing an application that includes an Auto Scaling group of Amazon EC2 Instances running behind an Elastic Load Balancer. All the web servers must be accessible only through the Elastic Load Balancer and none of them directly from the Internet. How should the Architect meet these requirements?

  1. With a CloudFront distribution in front of the Elastic Load Balancer.
  2. Denying traffic from the internet in the web server’s security group.
  3. Configure the web tier security group to allow only traffic from the Elastic Load Balancer.
  4. Install a Load Balancer on an Amazon EC2 instance.

Solution: 3. You cannot create deny rules in security groups. If we only allow traffic from the ELB access to the instances, it will be impossible to access from the Internet, so this is the correct solution.

An application that requires extremely high throughput and extremely low latencies need to be configured with an Elastic Load Balancer (ELB) behind. The connections will be made using the TCP protocol and the ELB must support load balancing to multiple ports on an instance. Which ELB should we use?

  1. Classic Load Balancer.
  2. Application Load Balancer.
  3. Route 53.
  4. Network Load Balancer.

Solution: 4. The Network Load Balancer operates at layer 4, so it supports TCP. It also supports Load Balancing to multiple ports on an instance and it provides high throughput and extremely low latencies.

A web application runs on several Amazon EC2 instances behind an Application Load Balancer (ALB). Which protocols can we use to do the health check? (Select TWO)

  1. SSL.
  2. TCP.
  3. ICMP.
  4. HTTP.
  5. HTTPS.

Solution: 4, 5. Application Load Balancers only support HTTP and HTTPS.

Application Load Balancer vs Network Load Balancer.
Application Load Balancer vs Network Load Balancer.

An application uses Amazon EC2 instances in a single Availability Zone and users connect over Layer 4. We need to make the architecture highly available and also more cost-effective. How can we best meet these requirements? (Select TWO)

  1. Configure an Application Load Balancer in front of the EC2 instances.
  2. Configure an Auto Scaling group to add or remove instances in the Availability Zone automatically.
  3. Increase the number of EC2 instances.
  4. Configure a Network Load Balancer in front of the EC2 instances.
  5. Configure an Auto Scaling group to add or remove instances in multiple Availability Zones automatically.

Solution: 4, 5. As we are connecting over layer 4, we need a Network Load Balancer. In order to enable High Availability, we need an Auto Scaling Group that adds and removes instances across multiple availability zones. The architecture will be cost-effective because the Auto Scaling Group will ensure the right number of instances.

We want to design the infrastructure to run an application on Amazon EC2 instances, which requires high availability and must dynamically scale based on demand to be cost-efficient. How can we best meet these requirements?

  1. Configure an Application Load Balancer in front of an Auto Scaling group to deploy instances to multiple Regions.
  2. Configure an Application Load Balancer in front of an Auto Scaling group to deploy instances to multiple Availability Zones.
  3. Configure Amazon CloudFront distribution in front of an Auto Scaling group to deploy instances to multiple Availability Regions.
  4. Configure Amazon CloudFront distribution in front of an Auto Scaling group to deploy instances to multiple Availability Zones.

Solution. 2. You cannot deploy instances in multiple regions with an Auto Scaling Group, but you can do it in Multiple Availability Zones, which would make the application highly available and scale based on demand.

Two web services on the same set of instances require that each of them listen for traffic on different ports. Which AWS service should we use to route traffic to the service based on the incoming request path?

  1. Amazon Route 53.
  2. Amazon CloudFront.
  3. Application Load Balancer (ALB).
  4. Classic Load Balancer (CLB).

Solution: 3.

An application needs to retain information about each user session. How could we do that with an Elastic Load Balancer (ELB)?

  1. Sticky sessions on an Elastic Load Balancer (ELB).
  2. Health Checks on Elastic Load Balancer (ELB).
  3. Server Name Indication on Elastic Load Balancer (ELB).
  4. Cross Zone Load Balancer (ELB).

Solution: 1.

Stickiness in Load Balancers.
Stickiness in Load Balancers.

An application runs on Amazon EC2 instances behind an Application Load Balancer, and its instances run in an Amazon EC2 Auto Scaling Group across multiple Availability Zones. The Auto Scaling group scales up to 20 instances during work hours, but it scales down to 2 instances at night. The application is very slow when the day begins, although it runs well by mid-morning. What should we implement to solve this problem and keep the cost to the minimum?

  1. Implement a scheduled action that sets the desired capacity to 20 shortly before the office opens.
  2. Implement a step scaling action triggered at a lower CPU threshold, and decrease the cooldown period.
  3. Implement a scheduled action that sets the minimum and maximum capacity to 20 before the office opens.
  4. Implement a target tracking action triggered when the CPU threshold is low, and decrease the cooldown period.

Solution: 4. It could be a good use case for the scheduled actions, but using a target tracking action would be more expensive than target tracking actions. You don’t need 20 instances at the very first hour of the morning, with target tracking actions you can start creating fewer servers and scale-out in case the CPU increases. This is a tricky question because you would normally go for the third option, but the key is keeping the cost to the minimum. Using a reduced cooldown period will also more quickly terminate unneeded instances, therefore reducing costs.

We are designing a web application that runs on Amazon EC2 instances behind an Elastic Load Balancer. One requirement is that all the data in transit must be encrypted. How could we do that? (Select TWO)

  1. Use a Network Load Balancer (NLB) with a TCP listener, then terminate SSL on EC2 instances.
  2. Use sticky sessions with the Application Load Balancer (ALB).
  3. Use an Application Load Balancer (ALB) with an HTTPS listener, then install SSL certificates on the ALB and EC2 instances.
  4. Use a Network Load Balancer (NLB) with an HTTPS listener, then install SSL certificates on the NLB and EC2 instances.
  5. Use an Application Load Balancer (ALB) with a TCP listener, then terminate SSL on EC2 instances.

Solution: 1, 3. You cannot use HTTPS in NLB as it works in layer 4, or TCP in ALB, as it works in layer 7. With the NLB, you can pass through encrypted traffic and terminate the SSL on the EC2 instances, or you could use an HTTPS listener in ALB and install the SSL certificates both in the instances and the ALB

Your Network Load Balancer (NLB) in one of your VPCs is not distributing traffic evenly between EC2 instances in your AZs. There are an odd number of EC2 instances spread across two AZs. The NLB is configured with a TCP listener on port 80 and is using active health checks. What is the most likely problem?

  1. There is no HTTP listener.
  2. Health checks are failing in one AZ due to latency.
  3. NLB can only load balance within a single AZ.
  4. Cross-zone load balancing is disabled.

Solution: 4.

Cross-Zone Load Balancer.
Cross-Zone Load Balancer.

And that’s all about Load Balancers & Auto Scaling Groups. If you understand all the questions, you should be ready for next week’s chapter on EBS, EFS & Instance Store. See you there!

Thanks for Reading!

If you like my work and want to support me…

  1. The BEST way is following me on Medium here.
  2. Feel free to give claps so I know how helpful this post was for you.
  3. Not a Medium member yet? Support my writing on Medium by joining through the link below:

--

--

--

Computer Science Engineer & Tech Lead @ThePowerMBA 🖥️. Data enthusiast 📊. Publishing AWS & SnowFlake ❄️ courses. https://plazagonzalo.medium.com/membership ⬅

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What are Lambda Functions? A Quick Guide to Lambda Functions in Python

Co-Founder Series: Christina Zhu

Introduction to Git

Why hiring in Web Sucks, for Early Age Startups!!!

A Meandering Path to Web Development

The “Arrival” Theory

Solving a SQL Murder Mystery

SSL Pinning in IOS Applications

https://go.fiverr.com/visit/?bta=373808&brand=fiverrcpa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gonzalo Fernandez Plaza

Gonzalo Fernandez Plaza

Computer Science Engineer & Tech Lead @ThePowerMBA 🖥️. Data enthusiast 📊. Publishing AWS & SnowFlake ❄️ courses. https://plazagonzalo.medium.com/membership

More from Medium

Summary of the AWS Solutions Architect Associate Exam

Cloud Resume Challenge Part 1: Static S3 Website, CloudFront & DNS

NACL — Study Notes — SAA-C02

A sample Project for Cloud beginners by a beginner