EBS vs Instance Store


EBS-backed means the root volume is an EBS volume and storage is persistent Instance store-backed means the root volume is an instance store volume and storage is not persistent 

On an EBS-backed instance, the default action is for the root EBS volume to be deleted upon termination 

Instance store volumes are sometimes called Ephemeral storage (non-persistent) 

Instance store backed instances cannot be stopped. 

If the underlying host fails the data will be lost Instance store volume root devices are created from AMI templates stored on S3 EBS backed instances can be stopped. You will not lose the data on this instance if it is stopped (persistent) EBS volumes can be detached and reattached to other EC2 instances EBS volume root devices are launched from AMI's that are backed by EBS snapshots 

Instance store volumes cannot be detached/reattached 

When rebooting the instances for both types data will not be lost 

By default, both root volumes will be deleted on termination unless you configured otherwise 

AWS EC2 Networking


Public IPv4 addresses are lost when the instance is stopped but private addresses (IPv4 and IPv6) are retained Elastic IPs are retained when the instance is stopped.

All accounts are limited to 5 elastic IP's per region by default AWS charge for elastic IP's when they're not being used 

An Elastic IP address is for use in a specific region only You can assign custom tags to your Elastic IP addresses to categorize them 

By default, EC2 instances come with a private IP Public IP addresses are assigned for instances in public subnets (VPC) 

Public IP addresses are always assigned for instances in EC2-Classic DNS records for elastic IP's can be configured by filling out a form 

Secondary IP addresses can be useful for hosting multiple websites on a server or redirecting traffic to a standby EC2 instance for HA

You can choose whether secondary IP addresses can be reassigned 

You can associate a single private IPv4 address with a single Elastic IP address and vice versa 

When reassigned the IPv4 to Elastic IP association is maintained 

When a secondary private address is unassigned from an interface, the associated Elastic IP address is disassociated 

You can assign or remove IP addresses from EC2 instances while they are running or stopped All IP addresses (IPv4 and IPv6) remain attached to the network interface when detached or reassigned to another instance 

You can attach a network interface to an instance in a different subnet as long as it’s within the same AZ 

You cannot team by adding ENIs to an instance Eth0 is the primary network interface and cannot be moved or detached 

By default, Eth0 is the only Elastic Network Interface 


AWS EC2 Instance types


Creating Instances 
Option to request a spot instance and specify the maximum bid price Choose whether to auto-assign a public IP - default is to use the subnet setting Can add an instance to a placement group Instances can be assigned to IAM roles which configures them with credentials to access AWS resources Termination protection can be enabled and prevents you from terminating an instance Basic monitoring is enabled by default (5-minute periods), detailed monitoring can be enabled (1-minute periods, chargeable) Can define shared or dedicated tenancy T2 unlimited allows applications to burst past CPU performance baselines as required (chargeable) Can add a script to run on start-up (user data) Can join to a directory (Windows instances only) There is an option to enable an Elastic GPU (Windows instances only) Storage options include adding additional volumes and choosing the volume type Non-root volumes can be encrypted Root volumes can be encrypted if the instance is launched from an encrypted AMI There is an option to create tags (or can be done later) 

You can select an existing security group or create a new one You must create or use an existing key pair - this is required An Amazon Machine Image (AMI) provides the information required to launch an instance An AMI includes the following: A template for the root volume for the instance (for example, an operating system, an application server, and applications) Launch permissions that control which AWS accounts can use the AMI to launch instances A block device mapping that specifies the volumes to attach to the instance when it's launched AMIs are regional. You can only launch an AMI from the region in which it is stored. However, you can copy AMI's to other regions using the console, command line, or the API 


Amazon Elastic Compute Cloud | Amazon EC2


Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers 

You are limited to running up to a total of 20 On-Demand instances across the instance family, purchasing 20 Reserved Instances, and requesting Spot Instances per your dynamic spot limit per region (by default) Amazon EC2 currently supports a variety of operating systems including: Amazon Linux, Ubuntu, Windows Server, Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Fedora, Debian, CentOS, Gentoo Linux, Oracle Linux, and FreeBSD EC2 compute units (ECU) provide the relative measure of the integer processing power of an Amazon EC2 instance  

With EC2 you have full control at the operating system layer  

Key pairs are used to securely connect to EC2 instances: 
A key pair consists of a public key that AWS stores, and a private key file that you store For Windows AMIs, the private key file is required to obtain the password used to log into your instance For Linux AMIs, the private key file allows you to securely SSH into your instance  

Metadata and User Data: 
User data is data that is supplied by the user at instance launch in the form of a script Instance metadata is data about your instance that you can use to configure or manage the running instance User data is limited to 16KB User data and metadata are not encrypted Instance metadata is available at http://169.254.169.254/latest/meta-data The Instance Metadata Query tool allows you to query the instance metadata without having to type out the full URI or category names 


More?