AWS-Day3-Assignment
What is an auto-scaling and what are its components?
Ans:
AWS AutoScaling is an advanced cloud computing feature that provides automatic resource management based on server load. A server cluster's resources typically scale up and scale down dynamically via mechanisms such as a load balancer, AutoScaling groups, Amazon Machine Image (AMI), EC2 Instances, and Snapshots.
Auto Scaling components:
The following table describes the key components of Amazon EC2 Auto Scaling.
1) Groups:
Your EC2 instances are organized into groups so that they can be treated as a logical unit for the purposes of scaling and management. When you create a group, you can specify its minimum, maximum, and, desired number of EC2 instances.
2) Configuration templates:
Your group uses a launch template, or a launch configuration (not recommended, offers fewer features), as a configuration template for its EC2 instances. You can specify information such as the AMI ID, instance type, key pair, security groups, and block device mapping for your instances.
3) Scaling options:
Amazon EC2 Auto Scaling provides several ways for you to scale your Auto Scaling groups. For example, you can configure a group to scale based on the occurrence of specified conditions (dynamic scaling) or on a schedule.
What are the benefits of auto-scaling?
Ans: AWS Auto Scaling can help you optimize your utilization and cost efficiencies when consuming AWS services so you only pay for the resources you actually need. When demand drops, AWS Auto Scaling will automatically remove any excess resource capacity so you avoid overspending. AWS Auto Scaling is free to use, and allows you to optimize the costs of your AWS environment.
What are Spot Instances?
Ans: Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the AWS cloud. Spot Instances are available at up to a 90% discount compared to On-Demand prices. You can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and test & development workloads.
What is AMI? List five commonly used AMI along with ami-id available on AWS Marketplace.
Ans: An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS that provides the information required to launch an instance. You must specify an AMI when you launch an instance. You can launch multiple instances from a single AMI when you require multiple instances with the same configuration. You can use different AMIs to launch instances when you require instances with different configurations.
An AMI includes the following:
One or more Amazon Elastic Block Store (Amazon EBS) snapshots, or, for instance-store-backed AMIs, a template for the root volume of the instance (for example, an operating system, an application server, and applications).
Launch permissions that control which AWS accounts can use the AMI to launch instances.
A block device mapping that specifies the volumes to attach to the instance when it's launched.
AMI along with ami-id available on AWS Marketplace:
1) Amazon Linux 2023 AMI
ami-05552d2dcf89c9b24 (64-bit (x86)) / ami-007427cfd41d66ec7 (64-bit (Arm))
2) macOS Ventura 13.5
ami-0bd2aa8d80856ebe8 (64-bit (Mac))
3) Red Hat Enterprise Linux 9 (HVM), SSD Volume Type
ami-008b85aa3ff5c1b02 (64-bit (x86)) / ami-09d5aaa0b11e7e75d (64-bit (Arm))
4) SUSE Linux Enterprise Server 15 SP5 (HVM), SSD Volume Type
ami-0874e7f6717a3cfd4 (64-bit (x86)) / ami-09b789f07079119aa (64-bit (Arm))
5) Ubuntu Server 22.04 LTS (HVM), SSD Volume Type
ami-0f5ee92e2d63afc18 (64-bit (x86)) / ami-077053fb4029de92f (64-bit (Arm))
Where are AMI stored?
Ans: Storage for AMIs is either provided by Amazon Elastic Block Store (EBS) or by an instance store volume created from a template stored in Amazon S3.
What is Launch Configuration?
Ans: A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances. When you create a launch configuration, you specify information for the instances. Include 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.
What are the different parameters that you configure to Auto Scale instances?
Ans:
The following configuration details are copied from the identified instance into the launch configuration:
AMI ID
Instance type
Key pair
Security groups
IP address type (public or private)
IAM instance profile, if applicable
Monitoring (true or false)
EBS optimized (true or false)
Tenancy setting, if launching into a VPC (shared or dedicated)
Kernel ID and RAM disk ID, if applicable
User data, if specified
Spot (maximum) price
What are EC2 Spot Blocks?
Ans: Spot blocks allow you to request Amazon EC2 Spot instances for 1 to 6 hours at a time to avoid being interrupted while your job completes.
Amazon Ec2 instances come in different flavors, where the availability/reliability of the machines is determined by various factors. The two well-known types of VMs in AWS are On-demand and Spot. However, there is a third type of VM that can be leveraged – Spot Block.
What is the difference between Savings Plan and Reserved Instances?
Ans: The primary difference between AWS Reserved Instances and Savings Plan is that Reserved Instances are based on a commitment to use a specific instance type at a fixed price for a specified period, while Savings Plans are based on a commitment to spend a specific dollar amount per hour on any EC2 instance type over a specific period.
What are Capacity Reservations?
Ans: On-Demand capacity Reservations enable you to reserve compute capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. Capacity Reservations mitigate against the risk of being unable to get On-Demand capacity in case there are capacity constraints. If you have strict capacity requirements, and are running business-critical workloads that require a certain level of long or short-term capacity assurance, we recommend that you create a Capacity Reservation to ensure that you always have access to Amazon EC2 capacity when you need it, for as long as you need it.