AWS Auto Scaling for EC2 Instances | Exam SAA-C03 Study Guide

Configure AutoScaling on EC2 Instances for Web-based Applications

Prev Question Next Question

Question

Which of the following components effectively allows a user to set up AutoScaling on EC2 instances for a web-based application? (Select TWO)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: A and C.

Option A is correct.

A launch configuration specifies the type of EC2 instance that Amazon EC2 Auto Scaling creates for you.

You create the launch configuration by including information such as the ID of the Amazon Machine Image (AMI) to use, the instance type, the key pair, security groups, and block device mapping.

https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html

Option B is incorrect.

Lambda functions are not required to set up auto-scaling for EC2 instances.

Option C is correct.

An Auto Scaling group is a collection of EC2 instances and the core of Amazon EC2 Auto Scaling.

When you create an Auto Scaling group, you include information such as the subnets for the instances and the number of instances the group must maintain at all times.

https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html

Option D is incorrect.

Elastic IP is nowhere used to set up auto-scaling for EC2 instances.

Launch Configurations

A launch configuration is a template that an Auto Scaling group uses to launch EC2 instances. When you create a launch configuration, you specify information for the instances

such as the ID of the Amazon Machine Image (AMI), the instance type, a key pair, one or more security groups, and a block device mapping. If you've launched an EC2 instance
before, you specified the same information in order to launch the instance.

You can specify your launch configuration with multiple Auto Scaling groups. However, you can only specify one launch configuration for an Auto Scaling group at a time, and
you can't modify a launch configuration after you've created it. Therefore, if you want to change the launch configuration for an Auto Scaling group, you must create a launch
configuration and then update your Auto Scaling group with the new launch configuration.

Keep in mind that whenever you create an Auto Scaling group, you must specify a launch configuration, a launch template, or an EC2 instance. When you create an Auto Scaling
group using an EC2 instance, Amazon EC2 Auto Scaling automatically creates a launch configuration for you and associates it with the Auto Scaling group. For more information,
see Creating an Auto Scaling Group Using an EC2 Instance. Alternatively, if you create a launch template, you can use your launch template to create an Auto Scaling group
instead of creating a launch configuration. For more information, see Creating an Auto Scaling Group Using a Launch Template.

The correct answers are A. Launch Configuration and C. Auto Scaling Group.

Auto Scaling is an AWS service that allows you to automatically adjust the number of EC2 instances in an Auto Scaling group based on the demand for your application. The purpose of Auto Scaling is to maintain the application's performance, availability, and cost-effectiveness by automatically adding or removing EC2 instances as needed.

Here's how Launch Configuration and Auto Scaling Group enable Auto Scaling for a web-based application:

  1. Launch Configuration: A Launch Configuration is a template that defines the configuration settings for a set of EC2 instances, including the AMI (Amazon Machine Image), instance type, security groups, and block device mappings. When you create a Launch Configuration, you specify the number of instances to be launched in the Auto Scaling Group, and the Launch Configuration is used to launch new instances as needed.

  2. Auto Scaling Group: An Auto Scaling Group is a collection of EC2 instances that are created from a common Launch Configuration. When you create an Auto Scaling Group, you specify the minimum and maximum number of instances that you want to have running, and the desired capacity for the group. The Auto Scaling Group then launches instances from the Launch Configuration as needed to maintain the desired capacity.

Together, Launch Configuration and Auto Scaling Group enable you to set up Auto Scaling for a web-based application. When traffic to your application increases, the Auto Scaling Group will automatically launch new EC2 instances based on the Launch Configuration, and when traffic decreases, it will terminate instances to maintain the desired capacity.

AWS Lambda is a serverless computing service that allows you to run code without provisioning or managing servers. While it can be used to trigger Auto Scaling actions, it does not directly enable Auto Scaling on EC2 instances.

Elastic IP is a static, public IP address that you can assign to your EC2 instances. While it can be useful for creating a static endpoint for your application, it does not enable Auto Scaling on EC2 instances.