AMI, Auto-Scaling, Spot Instances

·

4 min read

Day-3_AWS_Assignment

1. What is auto-scaling and what are its components?

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 allows you to automatically scale up and scale down the number of instances depending on the CPU utilization or memory utilization. There are 2 components in Auto scaling, they are Auto-scaling groups and Launch Configuration.

2. What are the benefits of auto scaling?

Better fault tolerance: Auto-scaling helps in determining and detecting which of the instances present on the server is unhealthy. Once established, the unhealthy instance is quickly terminated, and another healthy instance is sent as a replacement for the unhealthy one.
Better availability: Auto-scaling helps ensure that the application has the right amount of capacity for handling the current traffic demand
Better cost management: Auto-scaling can dynamically increase and decrease the capacity as required. With auto-scaling, one can launch instances when needed and also terminate these when they are not required.

3. What are Spot Instances?

Spot Instances: Amazon EC2 Spot Instances lets 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.

4. What is AMI? List five commonly used AMI along with ami-id available on AWS Marketplace.

An EC2 AMI (Amazon Machine Image) is a template used to launch EC2 instances. It contains the operating system, application software, and any necessary configurations.

AMI IDs are unique to each AWS Region.

AMI along with ami-id available on AWS Marketplace:

Amazon Linux 2023 AMI

ami-05552d2dcf89c9b24 (64-bit (x86)) / ami-007427cfd41d66ec7 (64-bit (Arm))

macOS Ventura 13.5

ami-0bd2aa8d80856ebe8 (64-bit (Mac))

Red Hat Enterprise Linux 9 (HVM), SSD Volume Type

ami-008b85aa3ff5c1b02 (64-bit (x86)) / ami-09d5aaa0b11e7e75d (64-bit (Arm))

SUSE Linux Enterprise Server 15 SP5 (HVM), SSD Volume Type

ami-0874e7f6717a3cfd4 (64-bit (x86)) / ami-09b789f07079119aa (64-bit (Arm))

Ubuntu Server 22.04 LTS (HVM), SSD Volume Type

ami-0f5ee92e2d63afc18 (64-bit (x86)) / ami-077053fb4029de92f (64-bit (Arm))

5. Where are AMI stored?

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.

6. What is Launch Configuration?

AWS Launch configuration is an instance configuration template that an Auto Scaling group has used to launch EC2 instances since 2010. Launch configuration requires information like Amazon Machine Image (AMI), the instance type, a key pair, one or more security groups, and a block device mapping.

7. What are the different parameters that you configure to Auto Scale 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.

8. What are EC2 Spot Blocks?

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 is completed.

9. What is the difference between a Savings Plan and Reserved Instances?

  • Commitment focus Reserved Instances are built on the commitment to utilize an instance at a specific price over a specific term. Whereas, Savings Plans are built on the commitment to spend a specified dollar amount per hour over a defined period.

  • Flexibility Offered Standard and Convertible Reserved Instances are allocated to a specific location/region, instance type, os version, and tenant. Only instances meeting the parameters will utilize the RI. Whereas, Savings Plans apply more broadly. EC2 Savings plans will cover anything in the same family and region as the commitment. Compute savings plans will cover any EC2 instance usage as well as Fargate and Lambda.

  • Repurposing Cloud Savings You can repurpose your Cloud compute savings plans and move workloads between instance types irrespective of the operating system or tenancy. In contrast, you might employ different instance types with Standard Reserved Instances for your stable infrastructure.

  • Selling in the AWS Marketplace The AWS Reserved Marketplace allows you to resell extra RIs or buy more Standard RIs via a 12% service charge. To increase your commitment without resetting your contract, you can also exchange your convertible RIs. Whereas, savings Plans cannot be bought or sold through AWS Marketplace.

  • The discounts offered Reserved Instances have greater discounts, though they are more stringent with how they apply. Savings plans are less restrictive with how they apply, but they save you less.

10. What are Capacity Reservations?

Capacity reservations enable you to reserve instances in advance so that the capacity is available for your workloads when you need it. Capacity reservations provide the following benefits: Assurance that you have the capacity necessary to manage your workload. AWS also offers discounted hourly rates in exchange for an upfront fee and term contract. Services such as Amazon EC2 and Amazon RDS use this approach to sell reserved capacity for hourly use of Reserved Instances.