Amazon EC2 is one of the most popular and frequently used service available on AWS (Amazon Web Services) Cloud platform. In this post I am going to answer some of the most common questions related to Amazon EC2 in very simple words so that anyone can understand and feel comfortable about using Amazon EC2 service in their day-to-day activities of launching servers on AWS Cloud platform. So let’s begin.
Q1. What is Amazon EC2?
Answer: Amazon EC2 is basically the Server offerings by AWS, the full name of the service is Amazon Elastic Compute Cloud i.e Amazon EC2 in short, but often people shorten it further by just saying EC2 in the context of Amazon Web Service, So most of the times in the documentation you will find EC2 being referred as Amazon EC2 but everywhere else you will simply see it as EC2, So in this entire post for the sake of simplicity we will also refer Amazon EC2 as EC2 because eventually it is a service available on Amazon’s Cloud platform AWS.
Q2. What is an EC2 Instance?
Answer: So when you launch a server using EC2 service on AWS Cloud platform we generally call it as an EC2 instance, You can launch multiple instances of EC2 servers using the single EC2 launch wizard by just increasing the Number of instances in the text box named “Number of instances” which is by default set to 1, but do remember every additional server will incur extra cost to you, We will talk about EC2 pricing soon.
Q3: Is EC2 Instance a Virtual Server or Physical one?
Answer: EC2 Instance is a Virtual Server running on one of the Physical Servers managed by AWS and shared among multiple customers, but if you need a Physical isolation (at Hardware level from other customers) to run some compliance workloads on your EC2 instances then you can choose EC2 Dedicated Host option which gives you a Physical Host to run your Virtual EC2 instances solely for your workloads, but please note that the Dedicated Host option will be bit costlier than the Virtual one.
Q4: How to select the Operating System for our EC2 Instance?
Answer: By selecting the relevant AMI you can launch an EC2 Instance with your desired Operating Systems like: Windows, Linux, macOS etc.
Q5: What is an AMI?
Answer: AMI stands for Amazon Machine Image, So these are the Images of different Operating Systems and Applications bundled together as a template for quickly launching the relevant EC2 Instances as per our use case.
Q6: What are the different type of AMIs we can use for our EC2 Instance?
Answer: Following are the types of AMIs that we can use for our EC2 Instance:
- Quick Start: These are the publicly available pre-built AMIs provided by AWS to launch an EC2 Instance with an OS like Windows, Linux or macOS with various Versions available for us to select from.
- My AMIs: These are the Private AMIs that you have created for your use or those have been shared with you by another AWS account, So these are not publicly available for everyone’s use.
- AWS Marketplace AMIs: These are the AMIs publicly available on AWS Marketplace published either by AWS or trusted third parties, this is also the category that contains the Paid AMIs.
- Community AMIs: These are the publicly available AMIs published by various AWS account holders.
Q7: What does an AMI actually contains?
Answer: An AMI generally contains one ore more Amazon Elastic Block Store (Amazon EBS) snapshots (for Amazon-EBS-Backed AMIs) and a template for the root volume of the instance (f.ex. an OS, an Application Server, and Applications) for Instance-Store-Backed AMIs, along with launch permissions to control which AWS accounts can use the AMI to launch instances from the AMI, and a block device mapping to specify the volumes to be attach during the launch of the instance.
Amazon EC2 Questions And Answers – Storage
Q8: What are Instance-Store-Backed AMIs?
Answer: The AMIs that are built using the Instance Store type of Volumes are known as Instance-Store-Backed AMIs.
Q9: What are Amazon EBS-Backed AMIs?
Answer: The AMIs that are built using Amazon EBS type of Volumes are known as Amazon EBS-Backed AMIs.
Q10: What is Amazon EC2 Instance-Store?
Answer: Instance store is basically the temporary/ephemeral storage for your instance, it is located on the disks that are directly attached to your host computer, because they are directly attached to the host computer that is why they are faster than the EBS Volume type of storage. They are best suited for temporary storage that changes frequently, like buffers, caches, scratch data.
Q11: What about the flexibility of Instance-Store Volumes?
Answer: Instance-Store Volumes are non-flexible, they can be only defined during the launch of an instance, that is why you can’t attach/detatch them after the instance is launched.
Q12: What about data persistence on Instance-Store Volumes?
Answer: The data on Instance-Store based Volume persists only till the life of the associated Instance (including the reboot event as well), but the data stored on it get lost once the associated instance is stopped, hibernated, terminated or in case the underlying disk drive fails. So do not rely on Instance-Store Volumes for long term data storage.
Q13: What are the available Instance-Store Volumes types?
Answer: There are different type of Instance-Store Volumes available based upon the quantity, size and performance of various EC2 instance types categories as mentioned below, please refer to this documentation link for the relevant tables of each category.
- General Purpose (m1 to m6)
- Compute Optimized (c1 to cc2)
- Memory Optimized (cr1, hpc, r3-6, x1, z1d)
- Storage Optimized (d2, d3, d3en, h1, hs1, i2, i3, i3en, i4i, im4gen, is4gen)
- Accelerated Optimized (dl1, f1, g2, g4ad, g4dn, g5, p3dn, p4d, p4de, trn1)