JavaScript Required

We're sorry, but we doesn't work properly without JavaScript enabled.

Cloud Computing Using EC2

Almost every organization is taking a step closer to cloud. Reason is obvious - To avoid upfront infrastructure cost and to avoid maintainence cost. Cloud Computing has changed the way Software companies used to work. Decade before, companies have to spend million to setup their infrastructure but gone are those days with the advent of Cloud.

Cloud Computing is on-demand availability of machines and storage at very affordable price and with no maintainence cost. Many known brands have entered into this space to leap the benefit such as Amazon, Azure, Google and Alibaba.

EC2- Elastic Cloud Compute

Elastic Cloud Compute

EC2 is a web service provided by Amazon to create machines on demain in Amazon cloud.It provides full control to choose.

Operating System: You can choose any OS such as Windows, Linux, and Unix etc.

Memory: You can configure memory that should be attached to your EC2 machine/instance as per your requirement.

CPU Cores: You can also choose how many core CPU you need, In addition, if you need any GPU card for gaming platforms & image processing.

IP Addresses: You can setup your own virtual cloud and can define the range of IP addresses that can be used for your EC2 instances.

Traffic Control: : You can control incoming as well as outgoing traffic from your EC2 machines by allowing & restricting traffic protocols.

WHY EC2?

Elastic Cloud Compute

SECURE

AWS provides robust security in their data center and follow strict privacy guidelines. So relying on Amazon cloud for infrastructure needs is absolutely stress free.

SCALABLE

You can increase or decrease from one to hundred of machines in minutes. AWS also provides auto-scaling group with EC2 that can scale up and scale down your machines as per configuration provided by you.

COMPLETE CONTROL

However, the machines are actually present in Amazon Datacenters but still you have complete control of your instances. You will have root access to interact them, to install any packages on them, to stop or terminate them at any moment

LOW COST

AWS adopts the pay as you use model, which makes it very cost effective since you will pay only for resources what you use.

RELIABLE

Even in case of any hardware failures, your EC2 machines will be replaced rapildy with healthy machines.Amazon guarantees is 99.99% availability for each Amazon EC2 Region.

AWS Services Associated with EC2

Elastic Cloud Compute

SECURITY GROUP

You can control the incoming and outgoing traffic to your EC2 instance using Security group.You can configure what kind of traffic can access your EC2 instance such as SSH,HTTPS,TCP etc.Moreover, you can also configure from what IP addresses that traffic can come.

ELASTIC LOAD BALANCER

As the name suggests, Elastic Load Balancer automatically distributes incoming application traffic across multiple Amazon EC2 instances to increase Availabilty & to decrease response time.

PLACEMENT GROUP

However, you have no control of EC2 hardwares directly but still you can configure how your EC2 instances should be placed with respect to each other using placement group.Placegroup group defines the strategy of placing EC2 instances.Using them you can define whether you want your EC2 instances to be placed on same hardware to enjoy higher network bandwidth and lower latency or you want your EC2 instances to be placed on separate hardware in different physical location to provide fault tolerance and high availibity

VIRTUAL PRIVATE CLOUD

You can also configure your private network over cloud to launch your EC2 instances and other resources inside it. VPC provides you flexibilty to choose your own IP addresses and to configure route tables and many other things.

Auto Scaling Group

Auto scaling group can automatically scale up and scale down your EC2 instances. You can define the minimum instances, maximum instances and desired instances for your application. So whenever your instances fails or crashes due to any reasons, Auto scaling group will make sure that minimum number of instances are always running by launching fresh EC2 instances and whenever incoming demand increases, auto scaling group will launch more instances upto number of maximum instances configured to meet that increasing demand.

Elastic Storage Block

Amazon Elastic Block Store (EBS) is a block storage that can be attached with Amazon Elastic Compute Cloud (EC2).It is just like virtual harddrive that can attached and detached from EC2 instances and can even be attached from one EC2 instance to another.

Launching Your First EC2 Instance

In order to launch your first EC2 instance, you have to signup to AWS using this link https://signin.aws.amazon.com/. Amazon provides 12 months of free tier in which you can enjoy many of the services free of cost upto 12 months.

  • Step 1: Go to EC2 Console

    Elastic Cloud Compute

    After you sign in to your aws account. To get started with EC2 you can go directly yo this link console.aws.amazon.com/ec2 or you choose EC2 under Computing Section in Services Tab. Once you are redirected to EC2 Console, click on “Launch Instance”.

  • Step 2: Choose AMI

    Elastic Cloud Compute

    In the next step, you have to choose specific AMI. AMI is Amazon Machine image, which defines what kind of machine will be launched. What will be the operating system, what all packages, tools, databases etc will be pre-installed on the system. Choose any AMI (choose free-tier elgible for demo purpose) and click on “Select”.

  • Step 3 : Choose EC2 Type

    Elastic Cloud Compute

    In the next step, you have to choose the Ec2 instance type that dictates CPU cores, memory, storage type, network performance and IPV6 support.There are different EC2 family types for different application need such as t2- For General Purpose applications, C5- for Compute Instensive workload, M5- memory intensive applications and many more. To learn more about Ec2 instance type, check this link https://aws.amazon.com/ec2/instance-types/. Once you select the Ec2 type click on “Configure Instance details”.

  • Step 4: Configure EC2

    Elastic Cloud Compute

    In this step, you have to define how many number of instances you want to launch, what will be VPC and subnet in those instances will be started, define placement group, and whether you want to install spot instances. Spot instance is a cheap alternative, if your application is stateless and can be stopeed any time then you can choose spot instances to save more.There are other options as well but you can keep them default and click on “Next: Add Storage”.

  • Step 5: Add storage

    Elastic Cloud Compute

    In this step, you can additional storage (ESB) with the instance. By default, our instance will have 8 GB of storage attached. Click on “Next: Add Tags” to proceed further.

  • Step 6: Add Tags

    Elastic Cloud Compute

    This is an optional step in which you can add some metadata with your Ec2 instance as key-value pair that defines your instance. After adding tags, click on “Next: Configure Security Groups”

  • Step 7: Configure Security Group

    Elastic Cloud Compute

    In next step, you have to define security group, which will define the incoming and outgoing traffic to/from our EC2 instance. You can add any number of rules and can define the IP addresses that can access our EC2 instance. Click on “Review and Launch” for final step.

  • Step 8: Review & launch

    Elastic Cloud Compute

    In the final step, click on Launch.

  • Step 9: Download SSH Keypair

    Elastic Cloud Compute

    Select “Create a new key pair”, provide some name to it and Download SSH keypair.This will be used to access EC2 instance using some SSH tool.

Conclusion

EC2 service provided by Amazon is undoubtedly fastest, scalable, secure and flexible way to launch machines in no time. Software application development Companies no longer need to worry about infrastructure since Cloud Computing is providing everything to them at price like never before.

Read More: