Category

EC2 (Elastic Cloud Compute)

How to Configure the Auto Scaling EC2 Cloud Instance Termination Policy

AutoscalingAWS Auto Scaling adds or removes the EC2 instances automatically based on a pre-configured condition. When a new EC2 instance is launched automatically it will be added to the Auto Scaling group. Auto Scaling allows the user to add a policy to decide on the termination of an instance. Before Auto Scaling terminates the EC2 instance, it first checks the availability zones. It will find the availability zone with the highest number of instances and delete the instance from there. If all the availability zones have the same number of instances, Auto Scaling selects any random zone. Once the availability zone is defined, Auto Scaling uses the termination policy to identify the instance to be deleted.

By default, Auto Scaling will delete the oldest instance from the selected availability zone. If more than one instance was launched simultaneously based on the scaling policy, Auto Scaling will take the instance that is closest to next instance hour. The above mentioned policy can result in cost savings. If more than one instance has the same time, Auto Scaling selects any random instance.

The present guide demonstrates how to configure and test the above mentioned termination policy for Auto Scaling. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

How to Launch EC2 Auto Scaling with an IAM on AWS Cloud

AutoscalingAWS Auto Scaling allows the user to automatically scale the Amazon EC2 compute resources up or down as per the defined conditions. The AWS resources launched with Auto Scaling require the AWS security credentials to access other AWS resources. AWS provides the IAM Role to easily access the other AWS resources from the newly launched EC2 computer resources.

(For example, a newly launched EC2 instance may need the AWS credentials to take a regular backup of the EBS volume).

To assign the IAM Role to Auto Scaling, the user has to create an IAM instance profile with EC2 access. An instance profile is a container for the IAM Role. The user has to first create an IAM role, which has the permission to access the EC2 resources. The above mentioned role must be added to the instance profile.

The present guide demonstrates how to launch Auto Scaling with an IAM role. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

How to Configure ELB Health Checks for AWS Cloud Auto Scaling

Amazon ELB iconAWS Auto Scaling allows the user to scale the Amazon EC2 computer resources up or down automatically as per the defined conditions. Auto Scaling ensures that all the running instances are healthy by performing periodic health checks. Auto Scaling is resilient as it will automatically terminate the unhealthy instance and launch a new healthy instance, thereby maintaining the number of running instances as per the configuration and condition.

The present guide demonstrates how to configure a health check for ELB and mark an instance as unhealthy. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

Do You Auto-Scale Your AWS Cloud?

AutoscalingDo you Auto-Scale your Cloud? Do you automatically shut down, resize or schedule your cloud compute resources?

Auto-scaling is one of the most important features for cloud computing. In order to really benefit from the cloud and ensure your capacity meets demand, you need to be able to scale your cloud’s allocated capacity automatically (up or down)  at any given time.

In comparison to the limited capacity of the traditional data center, the cloud has (at least in principle) infinite resources; auto-scaling being the basic feature of this perception. Auto-scaling configuration should react to a variety of monitored thresholds such as CPU load or even RPS (requests per second).

How to Collect AWS Cloud Auto Scaling Group Metrics

AutoscalingAWS Auto Scaling provides horizontal scaling by automatically adding or removing the computer resources for the application hosted on AWS. Auto Scaling is ideally suited for applications where there is a requirement for scalability. Amazon CloudWatch is used for the basic monitoring of several AWS products including Auto Scaling. In basic monitoring, Amazon CloudWatch collects the data points sent by Auto Scaling every five minutes. AWS CloudWatch offers detailed monitoring for Amazon EC2 and Auto Scaling. In detailed monitoring, an AWS service sends the data points to Amazon CloudWatch every minute.

Instance metrics are the metrics that an individual Amazon EC2 instance sends to Amazon CloudWatch. They are the same for any Amazon EC2 instance, whether the instance is a part of an Auto Scaling group or not.

The present guide demonstrates how to enable detailed monitoring for Auto Scaling and collect the Auto Scaling group metrics. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

How to Auto Scale (Based on Alerts) Behind an AWS ELB

AutoscalingAWS Auto Scaling allows the user to scale the Amazon EC2 computer resources up or down automatically as per the defined conditions. The user can configure auto scaling as per the requirement. The Amazon Web Services also provides Elastic Load Balancing (ELB) to manage the traffic on a fleet of Amazon Elastic Compute Cloud instances.

When the AWS EC2 resources are managed by ELB, adding new resources to ELB will ensure that the additional traffic is well distributed to the new resources and the application performance is maintained.

The present guide demonstrates how to configure Auto Scaling with Cloudwatch and ELB. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

How to Configure Email Alerts for AWS Auto Scaling Using SNS

AutoscalingAWS Auto Scaling allows the user flexibility to achieve horizontal scalability by automatically adding or removing the Amazon EC2 compute resources. AWS does not charge separately; it charges for all the additional EC2 compute resources. It is important for the user to know when Auto Scaling has added new resources and when resources have been removed. Auto Scaling can be configured with Simple Notification Services (AWS SNS) to get the notification when a new EC2 instance is launched or terminated.

The present guide demonstrates how to configure Auto Scaling to send an email notification when Auto Scaling adds or removes the EC2 computer resources. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by Auto Scaling  CLI.

How to Configure AWS Cloud Auto Scaling to Scale Based on a Schedule

AWS Auto Scaling provides horizontal scaling by automatically adding or removing computer resources for the application hosted on AWS. The present guide demonstrates how to configure Auto Scaling to scale based on a schedule. Auto Scaling is ideally suited for an application where there is a requirement for scalability.

AWS does not provide an AWS Management console for Auto Scaling. Thus, all the operations should be performed through CLI or API. When the user wants to configure Auto Scaling for their resources, it is required to follow certain steps. The first step is to create a launch configuration, which defines resources, such as the AMI, EBS or Instance Type or detailed monitoring to be added by Auto Scaling.

How to Configure AWS Auto Scaling to Scale Based on the Demand

AutoscalingAWS Auto Scaling provides horizontal scaling by automatically adding or removing computer resources for the application hosted on AWS. Auto Scaling is ideally suited for an application where there is a requirement for scalability.

AWS does not provide an AWS Management console for Auto Scaling. Thus, all the operations should be performed through CLI or API. When the user wants to configure Auto Scaling for their resources, it is required to follow certain steps. The first step is to create a launch configuration, which defines resources, such as the AMI, EBS or Instance Type or detailed monitoring to be added by Auto Scaling.

How to Configure AWS Auto Scaling to Scale Manually with a Fixed Number of EC2 Instances

AWS Auto Scaling provides horizontal scaling by automatically adding or removing compute resources for the application hosted on Amazon AWS cloud. Auto Scaling ensures that the number of Amazon EC2 instances increases seamlessly when the demand escalates for maintaining the application performance, and decreases automatically when the demand declines for minimizing the costs. This guide demonstrates how to configure Auto Scaling to scale manually with a fixed number of instances.

AWS does not provide an AWS Management console for Auto Scaling. Thus, all the operations should be performed through CLI or AWS APIs. When the user wants to configure Auto Scaling for their resources, it is required to follow certain steps. The first step is to create a launch configuration, which defines resources, such as the AMI, EBS or Instance Type, or detailed monitoring to be added by Auto Scaling.

Hitchhiker's Guide to The Cloud

Newvem's eBook for Cloud Operations