Aws Interview Questions 1734772145
Aws Interview Questions 1734772145
https://github.com/vaibhav0342
1. IAM and AWS STS quotas, name requirements, and character limits.
Resource Quota
1
Quotas for IAM entities
Resource Quota
2
2. How much data can be stored in a single bucket?
5TB
4. Limitation of S3
By default, customers can provision up to 100 buckets per AWS account.
However, you can increase your Amazon S3 bucket limit by visiting AWS
Service Limits.
An object can be 0 bytes to 5TB.
The largest object that can be uploaded in a single PUT is 5 gigabytes
For objects larger than 100 megabytes, customers should consider using the
Multipart Upload capability
6. S3 Encryption Support
AWS S3 offers multiple encryption options for stored data.
First, server-side encryption (SSE) can used to secure data-at-rest, which encrypts the
incoming object data as it is persisted into the storage layer. It protects user data from
prying eyes that have access to the physical media.
There are three ways to maintain the encryption keys for SSE:
Amazon S3-managed Encryption Keys (SSE-S3)
In this scenario the keys are managed by S3 itself and are only usable for S3
services.
Of note is that SSE is only protecting the data at rest, that is, how the data is delivered
is a separate concern.
3
This leads to the second encryption option for S3, which is client-side encryption
(CSE). Here the client is tasked to encrypt the data before it is sent to S3 and handles
the security of data-in-transit.
7. SSH
Generate ssh key without any arguments
# ssh-keygen
4
route the traffic based on this acquired information. Application-level content
includes packet details, HTTP and HTTPS details. This makes the routing
easier, faster and much more efficient. It’s one of the most widely used ELB.
5
Round Robin, Weighted Round Robin, least
Common Round Robin, least outstanding request.
algorithms connection, weighted least
connection etc.
Doesn’t examine the content Handles more complex
of higher layer protocols (e.g., routing decisions and
HTTPS requests/responses or provides greater efficiency
Benefits
TLS encryption) so it can be because it identifies the
faster than application load request load.
balancer.
A Gateway Load Balancer operates at the third layer of the Open Systems
Interconnection (OSI) model, the network layer. It listens for all IP packets
across all ports and forwards traffic to the target group that's specified in the
listener rule. It maintains stickiness of flows to a specific target appliance using
5-tuple (for TCP/UDP flows) or 3-tuple (for non-TCP/UDP flows). The
Gateway Load Balancer and its registered virtual appliance instances exchange
application traffic using the GENEVE protocol on port 6081.
9. What is listener?
A listener is a process that checks for connection requests, using the protocol and port
that you configure.
6
Auto
Scaling
Predictive scaling
Use predictive scaling to increase the number of EC2 instances in your Auto
Scaling group in advance of daily and weekly patterns in traffic flows.
In general, if you have regular patterns of traffic increases and applications that
take a long time to initialize, you should consider using predictive scaling.
Predictive scaling can help you scale faster by launching capacity in advance of
forecasted load, compared to using only dynamic scaling, which is reactive in
nature. Predictive scaling can also potentially save you money on your EC2 bill
by helping you avoid the need to overprovision capacity.
Scheduled scaling
Scheduled scaling helps you to set up your own scaling schedule according to
predictable load changes. For example, let's say that every week the traffic to
your web application starts to increase on Wednesday, remains high on
Thursday, and starts to decrease on Friday. You can configure a schedule for
Amazon EC2 Auto Scaling to increase capacity on Wednesday and decrease
capacity on Friday
7
3) Permissions boundaries – Use a managed policy as the permissions boundary
for an IAM entity (user or role). That policy defines the maximum permissions
that the identity-based policies can grant to an entity, but does not grant
permissions. Permissions boundaries do not define the maximum permissions
that a resource-based policy can grant to an entity.
5) Access control lists (ACLs) – Use ACLs to control which principals in other
accounts can access the resource to which the ACL is attached. ACLs are similar
to resource-based policies, although they are the only policy type that does not
use the JSON policy document structure. ACLs are cross-account permissions
policies that grant permissions to the specified principal. ACLs cannot grant
permissions to entities within the same account.
6) Session policies – Pass advanced session policies when you use the AWS CLI
or AWS API to assume a role or a federated user. Session policies limit the
permissions that the role or user's identity-based policies grant to the session.
Session policies limit permissions for a created session, but do not grant
permissions. For more information, see Session Policies.
Identity-based policies
Identity-based policies are JSON permissions policy documents that control what
actions an identity (users, groups of users, and roles) can perform, on which resources,
and under what conditions. Identity-based policies can be further categorized:
Managed policies – Standalone identity-based policies that you can attach to
multiple users, groups, and roles in your AWS account. There are two types of
managed policies:
AWS managed policies – Managed policies that are created and
managed by AWS.
Inline policies – Policies that you add directly to a single user, group, or role.
Inline policies maintain a strict one-to-one relationship between a policy and an
identity. They are deleted when you delete the identity.
NOTE - The different types of policies are for different use cases. In most cases,
we recommend that you use managed policies instead of inline policies.
8
Inline policies are useful if you want to maintain a strict one-to-one relationship
between a policy and the identity to which it is applied. For example, you want
to be sure that the permissions in a policy are not inadvertently assigned to an
identity other than the one they're intended for. When you use an inline policy,
the permissions in the policy cannot be inadvertently attached to the wrong
identity. In addition, when you use the AWS Management Console to delete
that identity, the policies embedded in the identity are deleted as well. That's
because they are part of the principal entity.
Shared (default) — Multiple Amazon Web Services accounts may share the
same physical hardware.
Dedicated Instance (dedicated) — Your instance runs on single-tenant
hardware.
Dedicated Host (host) — Your instance runs on a physical server with EC2
instance capacity fully dedicated to your use, an isolated server with
configurations that you can control.
9
Provides access to Provides runtime Provides software as
resources such as virtual environments, service to the users.
machines, virtual storage development and
etc. deployment tools for
applications.
Use by network architects. Use by developers, Use by end users.
There are two kinds of NAT devices which AWS offers- A NAT gateway and a NAT
instance. AWS recommends the usage of NAT gateways since it helps provide high
availability and a better bandwidth in comparison to NAT instance.
17. Difference between Security Groups and Network Access Control List
1. Security Group:
Security group like a virtual firewall. It has inbound and outbound security rules in
which all inbound traffic is blocked by default in private on AWS EC2. It does not
allow particular protocol no one will able to access our instances using this protocol
you can stop traffic by using that rule by default everything that is denied. There are
various multiple security groups on EC2 instances. We cannot block a specific IP
address using that security group but using the network access list. In which we edit
any rule a security group with faster effect.
2. Network Access Control List (Network ACL):
Network ACL is a modifiable default network. It allows all the inbound or outbound
IPv4 traffic and here we create a type of custom network all or each custom network
ACL denies all inbound and outbound traffic. This network is the stateless and separate
inbound and outbound rule with a default limit of 20 for both rules and starting with the
lowest numbered rule. In which all subnet in VPC must be combined with network
ACL one subnet -one network ACL at a time. It supports rules and deny rules and
operate the subnet level.
10
It is stateful, when we create an inbound It is stateless, it returns traffic must be
or an outbound rule. allowed explicitly.
We cannot block specific IP address We can block specific IP Address using
using SGs. NACL.
All rules are evaluated before deciding to Rules are processed in number order
permit traffic. when deciding whether allow traffic.
It starts with instance launch In which we assigned to subnet for all
configuration. instance.
It applies when someone specifies
security group when launching the They do not depend on user it
instance and it associates with security automatically applies all instances with
group. subnet.
11
19. What is AWS certification?
AWS stands for Amazon Web Services and it’s a cloud base services to host IT systems,
Infra etc. AWS service is offered by Amazon.
Amazon has AWS certification programs at various level i.e., Specialty, Professionals
and Associates. The below are the available certifications by AWS:
Associate
1. Certified Solutions Architect Associate
2. Certified Developer Associate
3. Certified Sysops Administrator Associate
Professional
1. Certified Solutions Architect Professional
2. Devops Professional
Specialty
1. Security
2. Advanced Networking
3. BiG Data
Virtualization
Virtualization is the process of running a virtual instance of a computer system in a
layer abstracted from the actual hardware. Most commonly, it refers to running multiple
operating systems on a computer system simultaneously.
There are two types of hypervisors:
Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare
metal” embedded hypervisor,
Type 2 hypervisor: hypervisors run on a host operating system that provides
virtualization services, such as I/O device support and memory management.
12
The most commonly deployed type of hypervisor is the type 1 or bare-metal hypervisor,
where virtualization software is installed directly on the hardware where the operating
system is normally installed. Because bare-metal hypervisors are isolated from the
attack-prone operating system, they are extremely secure. In addition, they generally
perform better and more efficiently than hosted hypervisors. For these reasons, most
enterprise companies choose bare-metal hypervisors for data center computing needs.
Type 1 hypervisors:
1. VMware ESX and ESXi
2. Microsoft Hyper-V
3. Citrix XenServer
4. Oracle VM
Type 2 hypervisor
1. VMware Workstation/Fusion/Player
2. VMware Server
3. Microsoft Virtual PC
4. Oracle VM VirtualBox
5. Red Hat Enterprise Virtualization
13
23. Global vs Regional vs AZ Resource locations
IAM
Users, Groups, Roles, Accounts – Global
o Same AWS accounts, users, groups and roles can be used in all regions
Key Pairs – Regional
o Amazon EC2 created key pairs are specific to the region
o RSA key pair can be created and uploaded that can be used in all regions
VPC Peering
o VPC Peering can be performed across VPC in the same account or
different AWS accounts. VPC Peering can now span inter-region
Elastic IP Address – Regional
o Elastic IP address created within the region can be assigned to
instances within the region only
EC2
Resource Identifiers – Regional
o Each resource identifier, such as an AMI ID, instance ID, EBS volume
ID, or EBS snapshot ID, is tied to its region and can be used only in the
region where you created the resource.
Instances – Availability Zone
o An instance is tied to the Availability Zones in which you launched it.
However, note that its instance ID is tied to the region.
EBS Volumes – Availability Zone
o Amazon EBS volume is tied to its Availability Zone and can be
attached only to instances in the same Availability Zone.
EBS Snapshot – Regional
o An EBS snapshot is tied to its region and can only be used to create
volumes in the same region and has to be copied from One region to
other if needed
14
AMIs – Regional
o AMI provides templates to launch EC2 instances
o AMI is tied to the Region where its files are located with Amazon S3.
For using AMI in different regions, the AMI can be copied to other
regions
Auto Scaling – Regional
o Auto Scaling spans across multiple Availability Zones within the same
region but cannot span across regions
Elastic Load Balancer – Regional
o Elastic Load Balancer distributes traffic across instances in multiple
Availability Zones in the same region
Cluster Placement Groups – Availability Zone
o Cluster Placement groups can be span across Instances within the same
Availability Zones
DynamoDb – Regional
All data objects are stored within the same region and replicated across multiple
Availability Zones in the same region
Data objects can be explicitly replicated across regions using cross-region
replication
WAF – Global
Web Application Firewall (WAF) services protects web applications from
common web exploits are offered at AWS edge locations and are global
CloudFront – Global
CloudFront is the global content delivery network (CDN) services are offered
at AWS edge locations
15
24. Type of instances?
General Purpose
General purpose instances provide a balance of compute, memory and networking
resources, and can be used for a variety of diverse workloads. These instances are ideal
for applications that use these resources in equal proportions such as web servers and
code repositories.
Compute Optimized
Compute Optimized instances are ideal for compute bound applications that benefit
from high performance processors. Instances belonging to this family are well suited
for batch processing workloads, media transcoding, high performance web servers,
high performance computing (HPC), scientific modelling, dedicated gaming servers
and ad server engines, machine learning inference and other compute intensive
applications.
Memory Optimized
Memory optimized instances are designed to deliver fast performance for workloads
that process large data sets in memory.
Accelerated Computing
Accelerated computing instances use hardware accelerators, or co-processors, to
perform functions, such as floating-point number calculations, graphics processing, or
data pattern matching, more efficiently than is possible in software running on CPUs.
Storage Optimized
Storage optimized instances are designed for workloads that require high, sequential
read and write access to very large data sets on local storage. They are optimized to
deliver tens of thousands of low-latencies, random I/O operations per second (IOPS) to
applications.
16
IPv6 addresses are globally unique, and are therefore public by default.
If you want your instance to be able to access the internet, but you want to
prevent resources on the internet from initiating communication with your
instance, you can use an egress-only internet gateway.
An egress-only internet gateway is stateful: it forwards traffic from the instances
in the subnet to the internet or other AWS services, and then sends the response
back to the instances.
2) Data Migration
AWS DataSync
AWS Snow Family
17
29. What are S3 storage classes?
Amazon S3 comes in eight storage classes:
S3 Intelligent-Tiering
It is most suitable for data with access needs that are either changing or unknown. S3
Intelligent-Tiering has four different access tiers: Frequent Access, Infrequent Access
(IA), Archive and Deep Archive. Data is automatically moved to the most inexpensive
storage tier according to customer access patterns.
S3 Standard
It is suitable for frequently accessed data that needs to be delivered with low latency
and high throughput. S3 Standard targets applications, dynamic websites, content
distribution and big data workloads.
S3 Standard-IA
It offers a lower storage price for data that is needed less often but that must be quickly
accessible. This tier can be used for backups and long-term data storage.
18
milliseconds. With S3 Glacier Instant Retrieval, you can save up to 68% on storage
costs compared to using the S3 Standard-Infrequent Access (S3 Standard-IA) storage
class, when your data is accessed once per quarter.
S3 One Zone-IA
S3 One Zone-IA is for data that is accessed less frequently, but requires rapid access
when needed. Unlike other S3 Storage Classes which store data in a minimum of three
Availability Zones (AZs), S3 One Zone-IA stores data in a single AZ and costs 20%
less than S3 Standard-IA.
Use of S3 One Zone-IA is indicated for infrequently accessed data without high
resilience or availability needs, data that is able to be recreated and backing up on-
premises data.
S3 Outposts
It adds S3 object storage features and APIs to an on-premises AWS Outposts
environment. S3 Outposts is best used when performance needs call for data to be stored
near on-premises applications or to satisfy specific data residency requirements
19
EBS
Volume
Types
SSD HDD
Previous
backed backed generation
volume volume
Cold HDD — The lowest-cost HDD design for less frequently accessed
workloads.
31. What is AWS Storage Gateway (Amazon Web Services Storage Gateway)
AWS Storage Gateway in an Amazon Web Services tool that connects on-premises
software resources with storage in the AWS public cloud. The service securely transfers
application data between on-premises software and cloud-based storage to improve
application scalability and help an enterprise save costs.
Storage Gateway service allows you to securely store the data in AWS cloud
for the scalable and cost-effective storage.
Storage Gateway is a virtual appliance which is installed in a hypervisor running
in a Data center used to replicate the information to the AWS particularly S3.
Amazon Storage Gateway's virtual appliance is available for download as a
virtual machine (VM) image which you can install on a host in your data center.
Storage Gateway supports either Vmware EXI or Microsoft Hyper-V.
Once you have installed the storage gateway, link it with your AWS account
through the activation process, and then you can use the AWS Management
Console to create the storage gateway option.
20
There are three types of Storage Gateways
Stored Cached
Volume Volume
File Gateway
It is using the technique NFS.
It is used to store the flat files in S3 such as word files, pdf files, pictures,
videos, etc.
It is used to store the files to S3 directly.
Files are stored as objects in S3 buckets, and they are accessed through
a Network File System (NFS) mount point.
Ownership, permissions, and timestamps are durably stored in S3 in the
user metadata of the object associated with the file.
Once the objects are transferred to the S3, they can be used as the native
S3 objects, and bucket policies such as versioning, lifecycle
management, and cross-region replication can be directly applied to the
objects stored in your bucket.
Storage Gateway is a virtual machine running on-premises.
Storage Gateway is mainly connected to aws through the internet.
It can use Direct Connect. Direct Connect is a direct connection line
between the Data center and aws.
It can also use an Amazon VPC (Virtual Private Cloud) to connect a
storage gateway to aws. VPC is a virtual data center. It represents that
the Application server and storage gateway do not need to be on-
premises. In Amazon VPC, storage gateway sits inside the VPC, and
then storage gateway sends the information to S3.
Volume Gateway
Volume Gateway is an interface that presents your applications with
disk volumes using the Iscsi block protocol. The iSCSI block protocol
is block-based storage that can store an operating system, applications
and also can run the SQL Server, database.
21
Data written to the hard disk can be asynchronously backed up as point-
in-time snapshots in your hard disks and stored in the cloud as EBS
snapshots where EBS (Elastic Block Store) is a virtual hard disk which
is attached to the EC2 instance. In short, we can say that the volume
gateway takes the virtual hard disks that you back them up to the aws.
Snapshots are incremental backups so that the changes made in the last
snapshot are backed up. All snapshot storage is also compressed to
minimize your storage charges.
Gateway-cached volumes allow users to store primary data in Amazon
Simple Storage Service (S3) while keeping frequently accessed data on-
premises. This configuration allows a user to store up to 32 volumes with
32 TB of data per volume. Gateway-cached volumes also allow a user to
take snapshots of volume data for protection.
Gateway-stored volumes maintain access to the entire data set. This
configuration stores data locally and backs up snapshots to S3 for disaster
recovery. A user is limited to 32 volumes with this configuration and a
maximum of 16 TB per volume.
Tape Gateway
Tape Gateway is mainly used for taking backups.
It uses a Tape Gateway Library interface.
Tape Gateway offers a durable, cost-effective solution to archive your
data in AWS cloud.
The VTL interface provides a tape-based backup application
infrastructure to store data on virtual tape cartridges that you create on
your tape Gateway.
It is supported by NetBackup, Backup Exec, Veeam, etc. Instead of
using physical tape, they are using virtual tape, and these virtual tapes
are further stored in Amazon S3.
Servers are connected to the Backup Application, and the Backup
Application can be NetBackup, Backup Exec, Veeam, etc.
Backup Application is connected to the Storage Gateway over the iSCSI
connection.
Virtual Gateway is represented as a virtual appliance connected over
iSCSI to the Backup application.
Virtual tapes are uploaded to an Amazon S3.
Now, we have a Lifecycle Management policy where we can archive to
the virtual tape shelf in Amazon Glacier.
Important points to remember:
File Gateway is used for object-based storage in which all the flat
files such as word files, pdf files, etc, are stored directly on S3.
Volume Gateway is used for block-based storage, and it is using an
iSCSI protocol.
22
Stored Volume is a volume gateway used to store the entire dataset
on site and backed up to S3.
Cached volume is a volume gateway used to store the entire dataset
in a cloud (Amazon S3) and only the most frequently accessed data
is kept on site.
Tape Gateway is used for backup and uses popular backup
applications such as NetBackup, Backup Exec, Veeam, etc.
32. What is Target Group?
A target group is a collection of endpoints or servers which the load balancer can route
traffic to. Usually, the load balancer will check a specific URL on each target node
within the group to make sure it’s healthy before routing traffic to it, but this can be
configured to always route traffic even when the target endpoint is unhealthy.
Interface endpoint is an elastic network interface (ENI) with a private IP address from
the IP address range of user’s subnet that serves as an entry point for traffic destined to
a supported service. It enables you to privately access services by using private IP
addresses.
Gateway endpoint is a gateway that you specify as a target for a route in your route
table for traffic destined to a supported AWS service. Currently supports S3 and
DynamoDB services.
23
36. IAM roles
An IAM role is an IAM identity that you can create in your account that has specific
permissions. An IAM role is similar to an IAM user, in that it is an AWS identity with
permission policies that determine what the identity can and cannot do in AWS.
37. What is the difference between terminating and stopping an EC2 instance?
Background Information
Amazon supports the ability to terminate or stop a running instance. The ability to stop
a running instance is only supported by instances that were launched with an EBS-based
AMI.
Terminate Instance
When you terminate an EC2 instance, the instance will be shut down and the
virtual machine that was provisioned for you will be permanently taken away
and you will no longer be charged for instance usage. Any data that was stored
locally on the instance will be lost. Any attached EBS volumes will be detached
and deleted. However, if you attach an EBS Snapshot to an instance at boot
time, the default option in the Dashboard is to delete the attached EBS volume
upon termination.
Stop Instance
When you stop an EC2 instance, the instance will be shut down and the virtual
machine that was provisioned for you will be permanently taken away and you
will no longer be charged for instance usage. The key difference between
stopping and terminating an instance is that the attached bootable EBS volume
will not be deleted. The data on your EBS volume will remain after stopping
while all information on the local (ephemeral) hard drive will be lost as usual.
The volume will continue to persist in its availability zone. Standard charges for
EBS volumes will apply. Therefore, you should only stop an instance if you
plan to start it again within a reasonable timeframe. Otherwise, you might want
to terminate an instance instead of stopping it for cost saving purposes.
24
establish a connection before maintaining a connection,
transmitting data and should and terminating a
close the connection after connection. UDP is efficient
transmitting the data. for broadcast and multicast
types of network
transmission.
TCP is reliable as it guarantees The delivery of data to the
Reliability the delivery of data to the destination cannot be
destination router. guaranteed in UDP.
TCP provides extensive error- UDP has only the basic error
checking mechanisms. It is checking mechanism using
Error checking
because it provides flow checksums.
mechanism
control and acknowledgment of
data.
An acknowledgment segment No acknowledgment
Acknowledgment
is present. segments.
Sequencing of data is a feature There is no sequencing of
of Transmission Control data in UDP. If the order is
Sequence Protocol (TCP). this means that required, it has to be
packets arrive in order at the managed by the application
receiver. layer.
TCP is comparatively slower UDP is faster, simpler, and
Speed
than UDP. more efficient than TCP.
Retransmission of lost packets There is no retransmission of
Retransmission is possible in TCP, but not in lost packets in the User
UDP. Datagram Protocol (UDP).
TCP has a (20-60) bytes UDP has an 8 bytes fixed-
Header Length
variable length header. length header.
Weight TCP is heavy-weight. UDP is lightweight.
Handshaking Uses handshakes such as SYN, It’s a connectionless protocol
Techniques ACK, SYN-ACK i.e. No handshake
TCP doesn’t support UDP supports Broadcasting.
Broadcasting
Broadcasting.
TCP is used by HTTP, HTTPs, UDP is used by DNS, DHCP,
Protocols FTP, SMTP and Telnet. TFTP, SNMP, RIP, and
VoIP.
The TCP connection is a byte UDP connection is message
Stream Type
stream. stream.
Overhead Low but higher than UDP. Very low.
25
41. Purchasing options of EC2 instances.
Amazon EC2 provides the following purchasing options to enable you to
optimize your costs based on your needs:
On-Demand Instances – Pay, by the second, for the instances that you
launch.
Savings Plans – Reduce your Amazon EC2 costs by making a commitment
to a consistent amount of usage, in USD per hour, for a term of 1 or 3 years.
Reserved Instances – Reduce your Amazon EC2 costs by making a
commitment to a consistent instance configuration, including instance type
and Region, for a term of 1 or 3 years.
Spot Instances – Request unused EC2 instances, which can reduce your
Amazon EC2 costs significantly.
Dedicated Hosts – Pay for a physical host that is fully dedicated to running
your instances, and bring your existing per-socket, per-core, or per-VM
software licenses to reduce costs.
Dedicated Instances – Pay, by the hour, for instances that run on single-
tenant hardware.
Capacity Reservations – Reserve capacity for your EC2 instances in a
specific Availability Zone for any duration.
Types of Websites
Static Website
Dynamic Website
I. Static Website: In Static Websites, Web pages are returned by the server which are
prebuilt source code files built using simple languages such as HTML, CSS, or
JavaScript. There is no processing of content on the server (according to the user)
in Static Websites. Web pages are returned by the server with no change therefore,
static Websites are fast. There is no interaction with databases. Also, they are less
costly as the host does not need to support server-side processing with different
languages.
26
Note: Static does not mean that it will not respond to user actions, These Websites
are called static because these cannot be manipulated on the server or interact with
databases (which is the case in Dynamic Websites).
II. Dynamic Website: In Dynamic Websites, Web pages are returned by the server
which are processed during runtime means they are not prebuilt web pages but they
are built during runtime according to the user’s demand with the help of server-side
scripting languages such as PHP, Node.js, ASP.NET and many more supported by
the server. So, they are slower than static websites but updates and interaction with
databases are possible.
Dynamic Websites are used over Static Websites as updates can be done very easily
as compared to static websites (Where altering in every page is required) but in
Dynamic Websites, it is possible to do a common change once and it will reflect in
all the web pages.
27
b) 32-bit or 64-bit Architecture
This parameter is based on the architecture of your selected OS.
c) Region
This parameter is based on the selected region of the Amazon machine image
that comprises regions, availability zones, and local zones. Each region operates
in different geographical regions and is independent of each other.
EBS-backed instances: In this case, the root device for an AWS instance –
launched using AMI – is an Amazon EBS volume that has been created from
Amazon EBS.
Instance store-backed instances: In this case, the root device for an AWS
instance – launched using Ami – is an Amazon instance store volume that has
been created from an Amazon S3 template.
28
EBS Backed Root Volumes:
An “EBS-backed” EC2 instance means that the root device for an EC2 instance
launched from the AMI is an EBS volume created from an AWS EBS snapshot.
AWS EBS is high performance block storage designed for use for EC2 instances
handling throughput and transaction intensive workloads. These workloads may
include relational, non-relational databases, containerized applications, file
systems etc.
EBS storage is storage on a remote network connected SAN or NAS (Network
Attached Storage)
Volume persists independently from the running life of an instance. After an
EBS volume is attached to an instance, you can use it like any other physical
hard drive.
EBS volume can be detached from one instance and attached to another
instance, supports encryption, and is also replicated across multiple availability
zones to provide high availability & durability.
Data on EBS stores persists over the reboots of the EC2 instances.
EBS backed instances can help you save money as they can be turned off and
when not being used
When an EBS snapshot is created, only the data on the EBS volume that has changed
since the last EBS snapshot is stored in the new EBS snapshot. In this way, it’s an
incremental backup.
When an EBS snapshot is used to restore data, all data from that EBS snapshot can be
restored as well as the data from the previous snapshots. In this way, the snapshot is a
full backup.
29
50. Is It Safe to Delete Old EBS Snapshots?
Yes. You can safely delete old EBS snapshots. New EBS snapshots will continue to
restore properly.
When you delete an old EBS snapshot, behind the scenes, AWS will consolidate the
snapshot data. It will move valid data forward to the next EBS snapshot and it will
discard invalid data.
ARM X86
Uses Reduced Instruction Set Computing Uses Complex Instruction Set
Architecture (RISC). Computing Architecture (CISC).
Executes single instruction per cycle. Executes complex instruction at a time,
and it takes more than a cycle.
Optimization of performance with Hardware approach to optimize
Software focused approach. performance.
Requires less registers, more memory. It uses more registers and less memory
Pipelining of instructions is a unique Less pipelined.
feature.
Faster Execution of Instructions reduces Time to execute is more.
time.
Complex addressing is managed by Inherently designed to handle complex
software. addresses.
Compiler plays a key role in managing The micro program does the trick.
operations.
Multiple Instructions are generated from Its Architecture is capable of managing
a complex one and executed individually. complex statement execution at a time.
Managing code expansion is difficult. Code expansion is managed easily.
Decoding of instruction is handled easily. Decoding is handled in a complex way.
Uses available memory for calculations. Needs supplement memory for
calculations.
Deployed in mobile devices where size, Deployed in Servers, Desktops, Laptops
power consumption speed matters. where high performance and stability
matters.
30
53. What are AWS CloudWatch?
CloudWatch collects monitoring and operational data in the form of logs, metrics and
events, and visualizes it using automated dashboards so you can get a unified view of
your AWS resources, applications and services that run in AWS and on-premises.
Using AWS CloudWatch, you can monitor your AWS account and resources and
generate a stream of events or trigger alarms and actions for specific conditions.
AWS Multi-Factor Authentication (MFA) is a simple best practice that adds an extra
layer of protection on top of your users name and password. With MFA enabled, when
a user signs in to an AWS Management Console, they will be prompted for their user
name and password (the first factor what they know), as well as for an authentication
code from their AWS MFA device (the second factor what they have). Taken together,
these multiple factors provide increased security for your AWS account settings and
resources.
31
Even if the password is stolen or hacked, the account is not compromised.
When you enable this authentication for the root user, it affects only the root
user credentials. IAM users in the account are distinct identities with their own
credentials, and each identity has its own MFA configuration.
Note: - If your AWS account root user multi-factor authentication (MFA) device
is lost, damaged, or not working, you can recover access to your account. IAM
users must contact an administrator to deactivate the device.
32
maintenance, and security is automated you to hire your own
by AWS. database administrators.
RDS is a highly available relational With EC2, you have to set
database. It automatically creates a up your database for high
Availability primary DB instance and replicates the availability.
data side by side to a standby instance in
a different Availability Zone.
Scaling up your database is With EC2, you have to
comparatively easier with Amazon RDS. setup such architecture
This can be done by adding replicas. It (Availability Groups,
Scalability allows you to easily configure read Sharding, and more)
replicas or set up synchronous replication manually with help of
across availability zones for enhanced other EC2 instances and
performance, availability, and durability. load balancer.
RDS offers automated backups. Plus, you With EC2, you have to take
Backups can get snapshots on-demand and keep care of backup.
them with you as long as you wish to.
RDS offers Provisioned IOPS or PIOPS EC2 allows you to meet
to achieve fast, predictable, and unique performance,
consistent Input/Output performance. replication, archival or DR
requirements by giving
Performance
you the required flexibility.
You can choose the EBS
(SSD) volume as per your
need
In RDS, you get 3 types of storage In EC2, you get the
options: following:
• General Purpose SSD: It offers cost- • You can get up to 8000
effective storage that is ideal for a broad IOPS and 800 MBPS with
range of workloads. These volumes provisioned IOPS and the
deliver single-digit millisecond latencies right EC2 instance (It
and the ability to burst to 3,000 IOPS for depends on instance type).
Storage extended periods of time. • You can use EBS RAID
• Provisioned IOPS: It is designed to and striping configurations
meet the needs of I/O-intensive for higher and better
workloads, particularly database performance.
workloads, that require low I/O latency
and consistent I/O throughput.
• Magnetic: It supports magnetic storage
for backward compatibility.
RDS supports Aurora, SQL Server, With EC2, you can
Compatibility MySQL, MariaDB, PostgreSQL, and configure any database you
Oracle. want.
With RDS, you don’t have control over EC2 offers complete
the system. control over the system.
Control
Complete control is one of
the key benefits of EC2.
33
RDS offers encryption at rest and in In EC2, EBS volumes are
transit. Data that is encrypted at rest encrypted to protect your
includes the underlying storage for DB data, both at rest and in
instances, Read Replicas, its automated motion. This is majorly
Security backups and snapshots. beneficial when traveling
from EBS volume to EC2
instance.
If you want an automated and cost-effective solution, go for RDS. Whereas, for more
control and flexibility, go for EC2.
59. How to check whether my user data passing to EC2 instance is executed or not?
You can verify using the following steps:
SSH on launch EC2 instance.
Check the log of your user data script in:
/var/log/cloud-init.log and
/var/log/cloud-init-output.log
You can see all logs of your user data script, and it will also create the /etc/cloud
folder.
34
61. What is stickiness?
Stickiness is a term that is used to describe the functionality of a load balancer to
repeatedly route traffic from a client to a single destination, instead of balancing the
traffic across multiple destinations.
Virtualization Cloud
Definition Technology Methodology
Create multiple simulated Pool and automate virtual
Purpose environments from 1 physical resources for on-demand use
hardware system
Deliver packaged resources to Deliver variable resources to
Use specific users for a specific groups of users for a variety of
purpose purposes
Virtualization Cloud
Configuration Image-based Template-based
Lifespan Years (long-term) Hours to months (short-term)
High capital expenditures Private cloud: High CAPEX, low
(CAPEX), low operating OPEX
Cost
expenses (OPEX) Public cloud: Low CAPEX, high
OPEX
Scalability Scale up Scale out
Workload Stateful Stateless
Tenancy Single tenant Multiple tenants
35
66. What is a Public subnet?
A public subnet is a subnet that is associated with a route table that has a route to an
Internet gateway. This gateway connects the subnet(work) to the Internet and to other
AWS services. Thus, the resources in that subnet able to communicate with the Internet.
The instances in the public subnet can send outbound traffic directly to the Internet with
the help of Internet Gateway, whereas the instances in the private subnet can’t because
we are not attaching Internet Gateway to the Private Subnets.
Instead, the instances in the private subnet can access the Internet by using a Network
Address Translation (NAT) gateway that resides in the public subnet.
Instances or resources living in the Private Subnet will be safer than Public Subnet
because any traffic initiated from the internet cannot reach directly to the endpoints in
Private Subnet, but can reach in Public Subnet.
36
In GCP we can configure a primary and at the same time, a secondary CIDR Range as
a part of a subnet:
Configure 10.1.0.0/16 as a primary CIDR Range
Configure 10.2.0.0/20 as a secondary CIDR Range
Here, primary IP Address of Virtual Machine is allocated from primary CIDR range,
whereas an alias IP range, 10.2.1.0/24, is allocated in VM from secondary CIDR range.
Some most common applications of Secondary IP Address include:
Companies and organizations need to add SSL certificates to their websites to secure
online transactions and keep customer information private and secure.
In short: SSL keeps internet connections secure and prevents criminals from reading or
modifying information transferred between two systems. When you see a padlock icon
next to the URL in the address bar, that means SSL protects the website you are visiting.
Since its inception about 25 years ago, there have been several versions of SSL
protocol, all of which at some point ran into security troubles. A revamped and renamed
version followed — TLS (Transport Layer Security), which is still in use today.
However, the initials SSL stuck, so the new version of the protocol is still usually called
by the old name.
37
74. Amazon Route53
Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS)
web service. It is basically designed for developers and corporate to route the end users
to Internet applications by translating human-readable names like
www.geeksforgeeks.org into the numeric IP addresses like 192.0.1.1 those computers
use to connect to each other. You cannot use Amazon Route 53 to connect your on-
premises network with AWS Cloud.
TTL is mandatory for each DNS record. So TTL is length that a DNS record
is cached on either the resolving server or user own Laptop. The Lower the
TTL, the faster changes to DNS records. Whenever you created record set,
you need to define TTL for it.
38
c) A Record (URL to IPv4)
The “A” record stands for Address record. The A record is used by computer
to translate the name of the domain to an IP address.
E.g.: (http://medium.com might point to http://126.78.98.90)
d) CNAME (Canonical Records- URL to URL)
CNAME Points a URL to any other URL. (gaurav.gupta.com =>
gkg.example.com), We use it only for Non-Root Domain (aka.
something.mydomain.com)
e) Alias Record:
Alias record points a URL to an AWS Resource, Alias record are used to
map resource record sets in your hosted zone to Elastic Load Balancer,
CloudFront or S3 Buckets websites.
f) AAAA: (URL to IPv6)
An AAAA record maps a domain name to the IP address (Version 6) of the
computer hosting the domain. An AAAA record is used to find the IP
address of a computer connected to the internet from a name.
g) MX Record (Main Exchange Record)
A mail Exchanger record (MX record) specifies the mail server responsible
for accepting email messages on behalf of a domain name. It is a resource
record in the Domain Name System (DNS). It is possible to configure
several MX records, typically pointing to an array of mail servers for load
balancing and redundancy.
Hosted zone: When the domain name is registered, Route53 creates a public hosted
zone that has the same name as the domain name. It is a collection of records that
contains information about how to route traffic of its domains and all of its
subdomains.
Create a hosted zone with either a public hosted zone or a private hosted
zone:
o Public Hosted Zone – for routing internet traffic to the resources for
a specific domain and its subdomains
o Private hosted zone – for routing traffic within a VPC
Create records in the hosted zone
Records define where to route traffic for each domain name or subdomain
name.
Name of each record in a hosted zone must end with the name of the hosted
zone.
DNS query: It is a request for information sent from DNS client to the DNS server.
Alias records: Alias records helps in routing internet traffic to AWS resources like
S3 bucket, Amazon CloudFront, etc. It is created at the top node of the DNS
namespace.
Name servers: They are the servers in the DNS that translates the domain name
into IP address so that internet traffic can be routed to the resources.
DNS failover: A method for routing the traffic from unhealthy resources to healthy
resources, whenever a failure is detected.
39
Routing policy: Routing policy determines how Amazon Route53 responds to
queries.
40
Multivalue routing policy: It is used when users want Route53 to return multiple
values in response to DNS queries. It first checks the health of resources and then
returns the multiple values only for the health resources.
Weighted routing policy: This routing policy routes traffic to multiple resources
with a single domain name according to the proportion decided by the user.
41
We also support reverse transition for Non-Archival Storage class (Glacier or Deep
Archive), by moving the object from either “STANDARD_IA” or “ONEZONE_IA” to
“STANDARD” storage class when the object is accessed. This reverse transition is
performed instantly once object is accessed.
84. How many volumes can you attach to a single EC2 instance?
For example, if you have no additional network interface attachments on an EBS-only
instance, you can attach up to 27 EBS volumes to it. If you have one additional
network interface on an instance with 2 NVMe instance store volumes, you can attach
24 EBS volumes to it.
partition
The partition in which the resource is located. A partition is a group of AWS Regions.
Each AWS account is scoped to one partition.
The following are the supported partitions:
aws - AWS Regions
aws-cn - China Regions
aws-us-gov - AWS GovCloud (US) Regions
42
43
44