EC2 Flashcards
What is EC2
It is virtual machie in cloud, which can be provisioned quickly in minutes.
What are the pricing Models for EC2
On-Demand:
Allows to pay a fixed rate by the hour without any pre-commitment
Reserved:
Capacity is reserved based on a contract with AWS, normally for 1 to 3 years
SPOT:
useful for applications with flexible start times. You can place a bid for whatever price you want for an instance price, providing even greater flexibility.
Dedicated Host:
Good for Government or legislative application, where sharing the tenancy with other applications is not allowed..
The existing software bound licences can also be used in the cloud.
Explain Security Groups
Used to allow connections to the EC2 services.When we create a security group all inbound traffic is blocked by default, we then have to manually give access to allow connections to individuals ip and port addresses.
More than one security group can be assigned to an EC2 instance.
Changes to security group take place immediately.
One security group can be attached to multiple EC2 instances and vice versa.
Security groups are stateful ie: if we create an inbound rule, then an outbound rule is automatically created.
We cannot block any ip address from Security group and it has to be done through Network access control List
What is EBS?
Elastic block store is a virtual Hard drive in the cloud.
There are 4 types of them.
General purpose SSD : gp 2 - general purpose uses and workload transactions.Max iops voulme 16000
Provisioned iops SSD : io1: High performing ssd for special cases like Database and stuff.Max iops Volume 64000
Thoughput optimised SSD :st1 : Low cost throughput optmised ssd designed for frequently accessed throughput intensive workloads.
Cold HDD: sc1: Low-cost solution for infrequently accessed
workloads
EBS Magnetic:standard: Workloads where data is infrequently accessed
What are the two kinds of volumes in EC2?
EBS backed and Instance store.
Ebs backed can be stopped and started while terminating we can ask AWS to keep the root storage Volume.
Instance store is called ephemeral storage, because we cannot start and stop, the root storage won’t be saved if we terminate it.
How to create an encrypted root device
Select the encrypted option while creating the image or
1) Create a snapshot of the unencrypted volume
2) Create a copy of the snapshot.
3) Encrypt it
4) Launch an instance from this encrypted volume
What is Cloud watch?
Used to watch the performance of EC2 instances and other provisioned services in AWS
What is Cloud Trial?
Cloud Trial is about auditing, recording the api calls, access and basically acts like a cctv for resources.Cloud Trail is about auditing
what is the advantage of Roles over credentials?
Roles are more secure than storing credentials and easier to configure. Roles can be assigned to EC2 after it is created through command line or UI.Roles are universal and they can be used in any region
What is EFS?
A way to store two or more EC2 instances to store data.
The data is elastic and its great for file servers
What are placement groups?
A way to group EC2 instances based on need.
They could be Clustered, Partitioned or Spread
Explain different placement groups?
Clustered:
All EC2 instance are kept close to each other. Used for Applications with Low Network Latency and high throughput.
Spread:
These are critical individual EC2 instances located on separate racks or hardware. It’s done this way to protect the instances against network failures
Partitioned:
These are multiple EC2 instances like HDFS, HBase, and Cassandra
Some instances of Ec2
A1:EC2 A1 instances are new general purpose instances powered by the AWS Graviton Processors that are custom designed by AWS, Good for webservers, microservices.
c3,c4 and C5:Compute optimised instances based on Intel Xeon Platinum processors.
F1: Instances based on FPGA, the ics can be reprogrammed to suit needs.
P2,P3, P4 : Performance optimised instances. They are good for Machine learning, deep learning kind of works.
G2, G3 : Good fpr Graphics intensive workloads like 3d modelling, games etc
Two major types of EBS
SSD backed:SSD-backed storage for transactional workloads (performance depends primarily on IOPS)
HDD backed:For throughput workloads (performance depends primarily on throughput, measured in MB/s)
How to attach multiple instance to single volume?
It isnt allowed.
what is EFS?
It is a file system which the EC2 instance can attach to and store data.