Elastic Compute Cloud

 EC2

Budget for AWS account setup

  • Can be enabled by root account as even admin account don't have access to it.
  • As you need to activate it from root account so that IAM user and role can use this facility.
  • After enabling the setting from root user then we can use admin role to check the billing and cost forecasting facility in AWS.
  • Free tires will help you to see all the facilities which are running at the moment and can lead to expanse. So it will help to know the service and you can close them if not needed.
  • We can create a budget for the month, for zero cost budget you can select the type of budget and can provide your email id to check the budget related alerts.
  • Email receiving criteria is 85%, 100% and above 100% usage.

EC2 basics:

  • Most popular AWS offering
  • EC2 - Elastic Compute Cloud - Infrastructure as a Service
  • It mainly consists in the capability of:
    • Renting virtual machines (EC2)
    • Storing data on virtual drives (EBS)
    • Distributing load across machines (ELB)
    • Scaling the services using an auto-scaling group (ASG)
  • Knowing EC2 is fundamental to understand how the cloud works

EC2 sizing and configuration options

  • Operating System (OS): Linux, Windows or Mac OS
  • How much compute power and cores (CPU)
  • How much random-access memory (RAM)
  • How much storage space:
    • Network-attached (EBS and EFS)
    • Hardware (EC2 Instance Store)
  • Network Card: speed of the card, Public IP address
  • Firewall rules: security group
  • Bootstrap script (configuration at first launch): EC2 User Data

ECS User Data

  • It is possible to bootstrap our instance using an EC2 User Data script
  • bootstrapping means launching commands when a machine starts
  • This script is only run once at the instance first start
  • EC2 user data is used to automate boot tasks such as:
    • Installing updates
    • Installing software
    • Downloading common files from the internet
    • Anything you can think of
  • The EC2 User data script runs with the root user

EC2 instance types: example

t2.micro is part of the AWS free tier (up to 750 hours per month)

Hands-On: Launching an EC2 Instance running Linux

  • We'll be launching our first virtual server using the AWS Console
  • We'll get a first high-level approach to the various parameters
  • We'll see that our web server is launched using EC2 user data
  • We'll learn how to start/stop/terminate our instance.
  • Key pair for ssh can be of RSA encryption and we can use .pem for linux and windows or Mac and .ppk for putty windows 7 and windows 8.

EC2 Instance Types:

  • You can use different types of EC2 instances that are optimized for different use cases (https://awe.amazon.com/ec2/instance-types/)
  • AWs has the following naming convention: m5.2xlarge
  • m: instance class
  • 5: generation (AWS improves them over time)
  • 2xlarge: size within the instance class
HPC Optimized is also a type of instance for EC2

General Purpose Instances:

  • Great for a diversity of workloads such as web servers or code repositories
  • Balance between:
    • Compute
    • Memory
    • Networking
  • t2.micro is a free tier general purpose EC2 instance.

Compute Optimized

  • Great for compute-intensive tasks that require high performance processors:
    • Batch processing workloads
    • Media transcoding
    • High performance web servers
    • High performance computing (HPC)
    • Scientific modeling and machine learning
    • Dedicated gaming servers
    • c6g is one of the example of it. It start with C.

Memory Optimized

  • Fast performance for workloads that process large data sets in memory
  • Use cases:
    • High performance, relational/non-relational databases
    • Distributed web scale cache stores
    • In-memory databases optimized for BI (business intelligence)
    • Applications performing real-time processing of big unstructured data
    • starts with R, X, high memory and z

Storage Optimized

  • Great for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage
  • Use cases:
    • High frequency online transaction processing (OLTP) systems
    • Relational and NoSQL databases
    • Cache for in-memory databases (for example, Redis)
    • Data warehousing applications
    • Distributed file systems
    • It start with I, D, H

Please check the above screenshot for comparison as given in EC2 instance type.


Comments

Popular posts from this blog

Machine Learning

Cloud Computing and IT

Cloud Monitoring