EC2 Basics

Last updated:

AZ resiliant. Instance fails if AZ fails. IAAS. Private by default. Instance launched in a VPC. Pay as you go. Based on state, billing happens. Pricing based on CPU,Memory,Storage,Networking.

Running

Charged for all 4.

Stopped

Only charged for storage.

Terminated

No charge.

AMI

Like server image. Can be used to deploy instances. Contain the following:

  1. Permissions
    1. Public - Everyone can use it
    2. Owner - Implicit
    3. Explicit - Specific AWS accounts can use it
  2. Root Volume
  3. Block Device Mapping (Links volume to device id/ So which is boot, which is data vol)

Connecting to EC2

RDP: 3389, SSH: 22 Authenticate using SSH key-pair. Private key can be seen only once. AWS has the public key. For Windows, use key to get admin password, and with that admin password, you can login.


references: EC2 basics