AWS Classroom Series – 26/Nov/2020

AWS Instance LifeCycle

  • Instance States Preview
  • pending:
    • This is a transition state preparing to enter running state
    • You will not be billed in this state
  • running:
    • The instance is ready & running
    • You will be billed in this state
  • stopping:
    • This is a transition state to perpare for stopped or stop-hibernate
    • You will not be billed for stopped but billed for hibernation
  • Stopped:
    • The instance is shutdown
    • No billing
  • Shutting down:
    • Tranisition state for terminated
    • Not billed
  • Terminated:
    • Instance is permanently removed
    • Not billed
  • Note: This doesnot apply for reservations.

AWS Instance Purchasing Options

  • AWS provides the following instance purchase options
    • On-Demand Instance:
      • Pay by second/hour of instance usage
    • Savings-Plan
    • Reserved Instances (RI):
      • In Reserved instance model, we give commitment to amazon on particular instance type for a period of 1 or 3 years
      • Payment can be made
        • Complete upfront
        • Partial Upfront
        • Pay as you go
      • Amazon gives the following flexibility in Reserved Instances
        • AZ flexibility: The RI instance discount applies to instance usage in any AZ in the specified region
        • Instance size flexibility: RI discount applies to instance usage within instance family regardless of size (Supported on Amazon linux/Unix instances)
    • Spot Instances:
      • We can reserve the unused hardware in AZ’s at very less cost
      • We can bid for a price of ec2 instance type with some price (usually very less)
      • when the ec2 instance type prices is equal to your bid price ec2 instance will be automatically created.
      • Once the price of ec2 instance increases (due to other bids), then ec2 instance will be evicted from your account.
    • Dedicated Hosts: EC2 dedicated host is a physical server with EC2 instance capacity fully dedicated to your use
    • Dedicated Instances: Dedicated instances are ec2 instances that run on hardware dedicated to single customer
    • Capacity Reservations Preview

Understanding ec2 pricing

  • Scenario-1:
    • My Team has to create test environment for the following architecture. You are asked to create an estimate of pricing
      • 2 Web Servers: 2 VCPUs & 8GB of RAM

      • 2 App Servers: 4 VCPUS & atleast 8 GB of RAM

      • 2 db Servers: 4 VCPUS and 16 GB of RAM

    • Since the environment is test, lets use general purpose compute
      • Webserver (t2.large => 2)
      • app server (t2.xlarge => 2)
      • db server (t2.xlarge => 2)
    • Lets create an estimate (excluding storage costs)
    • Navigate to pricing calculator Refer Here
    • On-demand estimate Preview
  • Scenario-2:
    • Create the estimate for the same resource as in scenario 1 for production env
      • Web Server: Compute optimized
      • App Server: Compute Optimized
      • Db Server: Storage Optimized
  • Create estimates for Scenario 2 with
    • Savings plan
    • Reserved Instances partial upfront & Complete upfront and see the price differences.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube