Category

AWS Console

How to Create the IAM Policy for AWS Cloud Auto Scaling

AutoscalingAWS Auto Scaling allows the user to automatically scale the Amazon EC2 compute resources up or down as per the defined conditions. The AWS Identification and Access Management allows the AWS user to create roles, users or groups for the organization. IAM is used to configure groups of users who will be allowed or denied access to specific AWS services. The user can provide or deny the access with a set of IAM policies.

The IAM Policy is used to grant access permission to a user, group or role based on the AWS resources specific rules. To give a particular IAM entity permission, the user needs to write a policy according to the access policy language that IAM uses and then attach the policy to the related AWS entity. In case of a group, the group users’ inherit the group policy. More than one policy can be attached to a group or a user.

The IAM Roles can also be used with Auto Scaling. Auto Scaling integrates with IAM so that the user can specify which Auto Scaling actions can be performed in the AWS Account with the Auto Scaling resources. Auto Scaling can be configured with IAM at a service level (e.g. create or delete launch configuration, create or update the Auto scaling group). However, it cannot be linked to a particular resource, such as a specific Auto Scaling group or instance.

Using IAM does not change how to scale or configure Auto Scaling. However, it changes who should do it.

The present guide demonstrates how to create an IAM policy for Auto Scaling. The policy will allow accessing or denying certain Auto Scaling services.

How to Suspend and Resume the AWS Cloud Auto Scaling Process

AutoscalingAWS Auto Scaling allows the user to automatically scale the Amazon EC2 compute resources up or down as per the defined conditions. The scaling process can be configured to maintain a fixed number of instances, scale up or down based on demand or scale up or down at fixed schedule. If it is required to change the scaling configuration, the scaling group or for some unforeseen reason not scale for sometime, the user may need to suspend the scaling process. Auto Scaling allows suspending the process for some time and resuming it when required.

The present guide demonstrates how to suspend or resume the Auto Scaling process. Since AWS does not provide the management console for Auto Scaling, all the tasks would be performed by CLI.

How to Use AWS Cloud Auto Scaling to Launch Spot EC2 Instances

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

Do you Auto-Scale your AWS Cloud?

In addition, it is also very important to track the cost of the AWS resources since AWS charges as per the pay as you go model.�?AWS provides three kinds of instances: On-demand, Reserved Instances and Spot Instances.

For the spot instance, the user can bid for the unused AWS EC2 compute power at a cheaper rate. The spot instance helps the user to save some costs as the price bid is normally lesser than the on-demand fixed price. To use a spot instance, it requires placing a bid for the maximum amount that the user is ready to pay. If the current spot price is lesser than the bid price, AWS allows the user to launch a spot instance, whereby it will be charged at the current spot price. When the spot instance price is higher than the maximum bid price, AWS will terminate the instance.

Spot instances gives very good flexibility as Auto scaling launches new instances on certain conditions and terminates them when not required. Using a spot instance helps the user to add additional compute power at a lower rate.

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

How to Invalidate a CloudFront Download Distribution Object

AWS CloudFront is a content distribution service offered by AWS to serve low latency content with high data speed. CloudFront caches the object�?to its edge location. If the user has updated an object before it has expired or before the Cache-control max age, CloudFront will still show the older object. If the user wants to load the updated object, it is necessary to remove the origin object from the CloudFront edge location. This can be achieved with:

  • Invalidating the object
  • Object versioning

The present guide demonstrates how to invalidate an object from a download distribution.

How to Add Caching Headers to Your Objects Using Amazon S3

AWS CloudFront is a content distribution service offered by AWS to serve low latency content with high data speed. CloudFront caches the object to its edge location. By default any object stays in the edge location for 24 hours after which CloudFront sends the request to its caching origin to fetch the object again. If the user has more dynamic data that requires frequent updates, it is recommended to lower the caching period. If the object does not change for a longer period and is requested frequently, it is advisable to increase the caching period. This is because the data transfer cost between S3 and CloudFront will be reduced. In addition, the latency will also improve as the load on the origin will be reduced.

The present guide demonstrates how to set cache-control and the expiration headers to an S3 object.

How to Automate Elastic IP Assignment on EC2 Instance Restart or Reboot

In AWS, users are charged for allocated Elastic IPs that are not associated with a running instance or network interface (VPC). Therefore, the accepted best practice is to keep only those IP addresses that will be needed in the future. Allocated Elastic IPs you don’t plan to use in the future, or those you just forgot to release, may contribute to unexpectedly high AWS bills.

Newvem tracks the usage of your allocated Elastic IPs and identifies those that haven’t been in use for a significant period of time. This information is gathered by analyzing your Elastic IP usage patterns, in particular their association or disassociation activity. Based on current benchmarks, Newvem recommends the release of an Elastic IP if it has not been used for more than a week.

One way to avoid having unattached Elastic IPs is to automate the assignment process in your EC2 Instance.

5 Challenges for an AWS EC2 Backup Solution

When you keep important business data in your EC2 servers, you need a backup and disaster recovery (DR) solution like you would for any server. For operational backup, the most efficient and effective approach in EC2 is to use EBS snapshots. These are the parallel of hardware snapshots in a traditional data center.In this post we will discuss the�?challenges you encounter when you use EBS snapshots.

How to Enable Termination Protection for an AWS EC2 Instance

AWS EC2 is a scalable, reliable and low-priced offering from Amazon for the user’s virtual computation or hosting needs. AWS EC2 instances can be launched or terminated any time. However, there may be a probability that the user may terminate the production instance by accident. To overcome the above mentioned problem, AWS provides a functionality called termination protection. Once enabled, the user cannot terminate the instance from the console or the command line API.

The present guide demonstrates how to enable termination protection for an instance.

Understanding AWS EC2 Instance Metadata

AWS EC2 is a scalable, reliable and low-priced offering from Amazon for the user’s virtual computation or hosting needs. An Amazon Machine Image (AMI) is an encrypted packaged-up environment that includes all the necessary bits to set up and boot the user’s instance. After an AMI is launched, the resultant running system is called an instance. Learn how to Launch an Amazon AWS EC2 Instance. The instance is the user’s basic computation building block. Amazon EC2 offers multiple instance types based on the RAM, Storage and Compute Units. Once launched, an instance looks very similar to a traditional host. The user will have complete control on the instances.

The present guide helps to understand the various parameters of metadata of an AWS Instance. Learn how to get the EC2 metadata.

How to Send Alert Emails Based on Your AWS Instance CPU Usage Alarm

Hitchhiker's Guide to The Cloud

Newvem's eBook for Cloud Operations