AWS/EC2

[AWS EC2] Amazon EC2 Basics

brightlightkim 2022. 3. 22. 05:35

AWS Basic Features

  • Can work anywhere in the world
  • Not Requiring any hardware units
  • Easily Sacalable (up and down)
  • You only pay for what you need
  • You have complete Control
  • Highly Secure

AWS EC2? (Cloud Server)

AWS EC2 USE CASE?

SNS, EC2, and S3 help users to do cases. (Advertise or Nofity)

 

How to create AWS EC2 Instance? 

 

  • Choosing a AMI (Amaon Machine Image)
    • AMI is a template that is used to create a new instance / machine based on user requirement.
    • AMI would contain: Software inforamtion, Operating System inforamtion, Volume information, Access permissions
    • AMI's are of 2 types:
      • Predefined AMIs
        • Created by Amazon and can be modified by the user
        • AMI Marketplace: thousands to use and pay.
      • Custom AMIs
        • Created by the user so that they can be reused.
  • Choosing an instance type (Which hardware)
    • Hardware specifications that are required in the machine from the previous step.
    • Instance types are fixed and their configurations cannot be altered.
    • 5 Main Families
      • Compute Optimized
        • gives us lots of processing power
      • Memory Optimized
        • Application require in-memory cache
      • GPU Optimized
        • Graphical Requirement (Gaming)
      • Storage Optimized
        • Sorage Server
      • General Purpose
        • Equally balanced.
  • Configuring instance (Configure Instance)
    • Specify
      • Number of instances
      • purchasing options
        • Multiple paying options (normal, reserved instance - pay for it upfront before months, spot instance)
          • pay less for using that instance
          • spot instance is lot cheaper than normal one. 
      • kind of network
      • the subnet
      • When to assign a public IP
      • the IAM role
        • IAM: Authentification
      • Shutdown behaviors (Very Different)
        • Stopping: Temporatily shutting down the system
        • Teminating: Returning control back to Amazon
      • Advanced details:
        • Users can add Bootstrap Scripts that are execcuted when the virtual machine starts up.
          • Bootstrap: scripts that you want to be run in the instance before it actually comes online.
          • ex: instead of I run it, I can create Bootstrap Shell Scripts and paste it in a console >> Amazon >> takes it and run it for the users. (automates it)
      • etc
  • Adding Storage (Adding Storage to the EC2 Instance)
    • Bunch of Storage Options
      • Ephemeral Storage (Temporary and Free)
        • Free users aget to access up to 30 GBs of SSD or Magnetic storage (which can be found under 'Volume Type'
      • Amazon Elastic Block Storage (Permanent and Paid)
      • Amazon S3
    • The size (in GBs), volume type, the location where the disk in mounted, and whether the volume needs to be encrypted.
  • Adding tags (Tags to easily identify)
    • For what purpose we create this
  • Configuring security groups
    • Allow or deny connections for EC2 Instance
    • Actual Firewall that sits in front of EC2 instance.
      • protects it from unexpected inbound and outbound traffic that I can tune my EC2 instance based on port numbers anad based on IP address.
  • Review
    • Configuration is what we wanted.. Checked.
    • Review the whole change. 
      • It will create a Key Pair
        • Public key that AWS stores and a private key file that I store.
          • Public Key is used by Amazon to identify the user.
          • Private key is downloaded by the user and kept by the user
            • Downloaded as .pem file.
  • Access the EC2 Instance
    • It will require PuTTY and PuTTY generator to communicate with Linux Instance from Windows type.
      • PuTTY is a requirement for a Windows system to connect with a Linux system.
        • Does not accept .pem file.  PuTTY generator enables to read it
        • 1st: Ceate a new .ppk file (private key)
        • 2nd: Conversion > Insert Key  > load the .pem file
        • 3rd: Select Save Private Key and find a location to save the key. 
        • 4th: Open PuTTY configuration tool >> provide my IP address and click on Auth

Use SNS (Simple Notification Service) to notify users? 

  • Subsribers
    • List (We put)
    • Notification is sent to your subscribers every time you add something to your bucket, through email.

 

'AWS > EC2' 카테고리의 다른 글

[AWS ECS] How to Create a virtual private cloud?  (0) 2022.03.23