AWS Questions
AWS Questions
11.If the key file of an ec2 instance is deleted unfortunately how will
you login to that instance?
Method 01:
i. Create image if the existing ec2 instance.
ii. Now stop the old instance
iii. Then create ec2 instance by instance using AMI option with
new key pair
iv. Now we get the old instance data in an new instance it is done
with the help of AMI.
Method 02:
i. Stop the original instance
ii. detach the old volume
iii. Attach the old volume to newly created instance
iv. Connect the instance.
v. lsblk – list blocks
vi. use mkdir/mnt/dir.name command to make directory
vii. cd /mnt/dirname
viii. now mount by using the command
mount –o rw,nouuid /dev/xvdf1 /mnt/dirname
ix. copy .ssh/authorized keys to mnt new volume by using
command
cat /home/ec2-user/.ssh/authorized_keys >> /mnt/dir.name/ home/ec2
user/.ssh/authorized_keys
x. unmount /mnt/dir.name
xi. detach the old volume from new instance & stop new instance
xii. Attach the old volume to a old instance as root volume by using
/dev/xvda
xiii. Start the original instance & connect using new key.
(II) CIDR suggest the user to use the IPV4 bit from 28 to 16
because if we use above 28 the IP production is less which
leads to insufficient of IP and if we use below 16 the IP will
be produced many which leads to wastage of IP.
13. Concpet of IGW,NAT, route table, route, subnet
02.Define CIDR.
Classless inter-domain routing (CIDR) is a set of Internet protocol
(IP) standards that is used to create unique identifiers for networks and
individual devices. The IP addresses allow particular information
packets to be sent to specific computers. ... That system is known as
CIDR notation.
03.Define Route table.
A route table contains a set of rules, called routes, that are used to
determine where network traffic is directed.Each subnet in your VPC
must be associated with a route table; the table controls the routing for
the subnet. A subnet can only be associated with one route table at a
time, but you can associate multiple subnets with the same route table.
04. Define Internet gateway.
An Internet gateway is a horizontally scaled, redundant, and
highly available VPC component that allows communication
between instances in your VPC and the Internet. It therefore
imposes no availability risks or bandwidth constraints on your
network traffic.
An Internet gateway supports IPv4 and IPv6 traffic.
To enable access to or from the Internet for instances in a VPC subnet, you
must do the following:
AUTHENTICATION AUTHORIZATION
The process of verifying the identity of
a user. The process of granting or denying
access to resources.
Logging in with a username and
password. Accessing files, databases, or resources
based on user roles.
11.If accidently set the CIDR subnet value is given more than
required as a result more servers or came to that subnet in that
case can decrease the subnet size ?
In AWS, once you have created a subnet with a certain CIDR
block, you cannot directly decrease the subnet size or change its
CIDR block. However, you can address this situation by creating a
new, smaller subnet and migrating your resources to this new subnet.
12.Define lifecycle management in S3?
Initially the object which was created in S3 is in standard storage
class. If the particular object needs to move to another class it can be
done but the object should be placed in that class for atleast 30 days.
Therefore the lifecycle management keeps the object in a rotational
basis
VPCs are isolated networks within AWS, and resources like NAT Gateways are
bound to their specific VPC. This means they cannot be accessed directly by
resources in another VPC without an intermediary.
Routing Restrictions:
Each VPC has its own routing tables, and you can't directly route traffic between
VPCs without a connection like VPC peering, a Transit Gateway, or a VPN.
DAY 10 – ROUTE 53
01. Define R53 in AWS.
Route 53 is a global access AWS service which is considered as
highly available Domain name system (DNS). 53 is a port number.
Root domain
Child domain
03. How many name servers will be created after purchasing domain
from any domain selling vendors?
4 name servers.
04. Define DNSSEC.
DNSSEC stands for Domain name system ssecurity extensions,
kind of certificate used to protect domains.
Prevents from DNS spoofing
05. Define user data in AWS.
User data is a bootstrap script it will execute when
provisioning of EC2 instance.
It is not possible to edit user data in a running instance.
06. What are the types of routing policy in an AWS R53?
Simple routing policy – Use for a single resource that performs a
given function for your domain, for example, a web server that
serves content for the example.com website. You can use simple
routing to create records in a private hosted zone.
Failover routing policy(mostly used) – Use when you want to
configure active-passive failover. You can use failover routing to
create records in a private hosted zone.
Geolocation routing policy – Use when you want to route traffic
based on the location of your users. You can use geolocation routing
to create records in a private hosted zone.
Geoproximity routing policy – Use when you want to route traffic
based on the location of your resources and, optionally, shift traffic
from resources in one location to resources in another location. You
can use geoproximity routing to create records in a private hosted
zone.
Latency routing policy(mostly used) – Use when you have
resources in multiple AWS Regions and you want to route traffic to
the Region that provides the best latency. You can use latency
routing to create records in a private hosted zone.
IP-based routing policy – Use when you want to route traffic based
on the location of your users, and have the IP addresses that the
traffic originates from.
Multivalue answer routing policy – Use when you want Route 53
to respond to DNS queries with up to eight healthy records selected
at random. You can use multivalue answer routing to create records
in a private hosted zone.
Weighted routing policy(mostly used) – Use to route traffic to
multiple resources in proportions that you specify. You can use
weighted routing to create records in a private hosted zone.
Objectives:
Warm standby:
Multi-site active/active:
Components:
These components are called grouping size:
Launch template => AMI
Minimum : 3
Desired : 2
Maximimum : 6
03. Define load balancer in AWS?
Elastic Load Balancing automatically distributes your incoming
traffic across multiple targets, such as EC2 instances, containers,
and IP addresses, in one or more Availability Zones. This
increases availability of your application.
LB consider health check while routing traffic.
It provides cross zone support.
04. What is stickiness in load balancer?
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.
05. Monolithic vs Microservices:
06. What are all the possibilities to create as target group when
creating application load balancer.
Instances
IP addresses
Lamda function
Application load balancer
07.Network LB work on layer 4 of OSI which means transport
with TCP, UDP