EC2(Elastic compute cloud)

0
397
EC2(Elastic compute cloud)
EC2(Elastic compute cloud)

EC2(Elastic compute cloud)


  • Amazon Elastic compute cloud is a webservice that provides resizable compute capacity in the cloud.
  • Amazon Ec2 Reduces the time to obtain and boot new server instances into minutes.
  • Allowing us to quickly scale capacity up and down as our computing requirements change.

EC2 Features

  • Amazon Ec2 changes the Economics of computing by allowing you to pay only for capacity that we actually use.
  • Amazon Ec2 provides developers the tool to build failiure resilient applications and isolate themselves from common failure scenarios

EC2 Purachasing Options

  • On Demand
  • Reserved Instances
  • Scheduled Instances
  • Spot Instances
  • Dedicated Hosts
  • Dedicated Instances

Ec2 Instance Purchase Options

  • On-Demand instances — Pay, by the hour, for the instances that you launch.
  • Reserved Instances — Purchase, at a significant discount, instances that are always available, for a term from one to three years.
  • Scheduled Instances — Purchase instances that are always available on the specified recurring schedule, for a one-year term.
  • Spot instances — Bid on unused instances, which can run as long as they are available and your bid is above the Spot price, at a significant discount.
  • Dedicated hosts — Pay for a physical host that is fully dedicated to running your instances, and bring your existing persocket, per-core, or per-VM software licenses to reduce costs.
  • Dedicated instances — Pay, by the hour, for instances that run on singletenant hardware.

Spot Instance Pricing

  • If the Spot instance was terminated by Amazon Ec2, you will not be charged for a partial hour of usage.
  • However if we terminate the instances ourself, we will be charged for any hour in which the instance ran.

Ec2 Instance Types Current Generation


AWS Current Generation

Types of EC2


Aws Types of EC2

Ec2 Placement Groups

  • A Placement group is a logical grouping of instances wthin a single Availability Zone. Using placement groups enables applications to participate in a low latency,10Gbps network.
  • Placement groups are recommended for applications that require low latency , High netwotk throughput or both.

Placement Groups Restrictios

  • A Placement group can’t span multiple AZ’s
  • Name for placement group must be unique within AWS account
  • Only certain types of instances(compute,GPU,Memory,Storage optimized) can be launched into placement groups.
  • AWS recommends homogenos instances in placement groups.
  • can’t merge placement groups.
  • can’t move an existing instance into a placement group

EC2 MetaData

  • Data about data. to get all the information about the particular instance from the command line.
  • Curl http://169.254.169.254/latest/meta-data/

Security Groups

All inbound traffic is blocked by default

All outbound traffic is allowed by default Changes are applied immediately one SG can be applied to many Ec2 Instances one Ec2 instance can have many SG.

Security groups are stateful. can not block specific ip address can specify allow rules not deny rules.

Volumes & Snapshots

  • Volumes exists on EBS(Elastic Block Store)
  • Snapshots exists in S3
  • Snapshots are point in time copies of volumes and incremental.
  • First snapshot will take some time to create.

Raid Array Snapshot

  • Due to Interdependancies of RAID array, We need to take Application Consistent snapshot.

Freeze the File system

Unmount the RAID Array

Shutting down the associated instance and take snapshot.