EC2 Placement Groups

  • A placement group is a logical grouping of instances within a single Availability Zone
  • AWS provides an option of creating a Placement Group in EC2 to logically group the instances within as single Availability Zone
  • We get the benefits of low network latency and high network throughput by using a Placement Group
  • Placement Group is a free option as of now
  • Using placement groups enables applications to participate in a low-latency, 10Gbps network
  • Placement groups are recommended for applications that benefit
  • from low latency, high network throughput, or both
  • Used in Hadoop, Casandra, grid computing
  • Cannot span multiple availability zones, single point of failure
  • The name that you specify must be unique in your account
  • Only certain types of EC2 instances can be launched in a placement group (Compute optimized, GPU, Memory optimized, Storage Optimized)
  • AWS recommends homogenous instances within a placement group (same size and same family)
  • Cannot merge placement groups
  • Cannot move instances into placement groups. (Snapshot and copy to group works)
  • When we stop an instance, it will run in same Placement Group in restart at a later point of time
  • Because of the low latency required for a cluster placement group, each cluster placement group can only exist within 1 availability zone
  • The biggest limitation of Placement Group is that we cannot add Instances from multiple availability zones to one Placement Group
  • Placement groups cannot be deployed across multiple availability zones
  • A cluster placement group is a logical grouping of instances within a single Availability Zone.
  • Placement groups are recommended for applications that benefit from low network latency, high network throughput, or both.
  • To provide the lowest latency, and the highest packet-per-second network performance for your placement group, choose an instance type that supports enhanced networking.
  • You can move an existing instance to a placement group, move an instance from one placement group to another, or remove an instance from a placement group
  • Before you begin, the instance must be in the stopped state

Launching an EC2 instance

  • Console and then EC2 dashboard
  • Resource section shows what is running
  • Shows region and availability zone status
  • Create instance
  • Choose Amazon Machine Image (AMI)
  • Select free tier section
  • Best to use Amazon AMI image comes pre-baked with Python and many features like DB’s
  • Choose instance type (see above) t2 micro is free
  • Use on –demand instances
  • Create a VPC (important for exam)
  • One subnet per AZ
  • Auto assign an IP address
  • IAM role (create ahead of time in IAM)
  • Shutdown, stop or terminate leave as stopped (do not leave running as you will be charged)
  • Termination leave on
  • Tenancy shared for now
  • Advanced (a script that runs on startup)
- add #!/bin/bash
- Yum update y
  • Add storage root and mount point, leave as default
  • Know that delete on termination is checked, it will delete the storage volume
  • Cannot enable encryption on the root volume and you can encrypt additional volumes
  • The OS volume cannot be encrypted
  • Tag instance is keys/tags
  • Security groups big on exam, a virtual firewall create a SG to see what it is all about, endpoint level security ACLs
  • Use HTTP SSH RDP in security group rule as a minimum
  • Review and Launch gives all the config details
  • Bottom right is the launch button
  • Create a new key pair (or use existing key pair)
  • Give it a name such as Ec2Key.pem
  • Download key pair
  • Save it off from download directory, this is my private key (DO NOT LOSE IT)
  • Launch the instance (takes seconds up to minutes)
  • Go to view to see the status of the EC2 instance in the AWS console
  • Get the DNS link for PuTTY
- Ssh ec2-user@x.x.x.x I Ec2Key.pem
- Chmod 600 Ec2Key.pem
- Sudo su (on the instance)
- Yum update y
  • Look at the console pull down menus, connect and actions
  • If you delete the root instance the EBS volume also gets deleted
  • Default ec2 username is ec2-user and no password for Linux AMIs

发表评论

电子邮件地址不会被公开。