Aws Interview Questions

 1).Master ec2 spot instances : ultimate guide to massive savings:


how to setup and configure the spot instances into our aws

environment?


first am goin go setup the network setup:


next am going to create the two subnets .


one is public subnet and another one is private subnet


next am going to craete the two route tables


in first route table we are going to attach with the public subnets


in our second route table we are going to attach with the 


private subnets


next am going to add the igw routes with the public subnet route tables


first am going to take the public subnet . 


here we can see the fleet of ec2 instances 


then go to the ec2 service


under we have to see sopt request


click on request spot instances.


launch parameters


use the launch template


first am going to craete the launch template 


then choose the launch template after launch instances


whener we are working with the ec2 server , we will get the two keys . 


one is private key and another one is public key


public will be always associated with your ec2 instances

those ec2 instances can be your spot instances


as well as OnDemand ec2 instances


private key is always with you only


launch template is created .


go to the spot requests


launch template 


choose template which we are created


then we can see the additional request details it will be there


we can leave as default


target capacity :


here we can mentions how many ec2 instances you want .


based on that we have to mentioned that number here


fr example am going o allocate the 4 spot ec2 instances


if you want more customize configurations we can configure it


under that we have see the options called as the,


include on-demand base capacity


maintain target capacity


set maximum cost for spot instances


next thing is network


select vpc


avilbility zone


select the public subnets as will with togather avilibity zone

if oyu don't want public subnet we can choose the private subnet

------------------



once the request the spot instance's 


you are request 4 spot ec2 instances 


you are just bidding the 4 spot instances 


and the aws will check their datacenter ,are those spot instances avilnel.are those 4 spot instances are available ,

those sopt instnaces are allocated to you


based on their request . those are requires are server .based on their it will allocated


but .spot instances are not gratuned .if someone else request this spot instances as a OnDemand ec2 spot instances ,


then the spot instances' i will loose it .aws will give sometimes , like this is spot intances its going to terminated for sometime .take 


those user paying more then money to get this


----------------------------------------------

instance type requirements

required instances attributes:(how do you want )


here we can allocated the vcpu and memory's


in those 4 ec2 server i have 4 cpus and 2 memory's


i can either 4 cpus nad i can either 4 cpu as well


in to my spot instances


am goin to mentions minimum and maximum


i can specify the how memory we want 


previewing machine instances types


if its needed we can choose the or else we can leave as leave



allocation straedy


craete dag


 fleet request as a glance 


then launch it

------------------------------------------------------



go to the spot requests :


them we can see the 4 spot ec2 instances


then go to the instances 


user this instances we have to see the 4 spot ec2 instances


yes allow the four ec2 sinatces are running.


after we have to verify the instances status


----------------------



next we are going to run the OnDemand ec2 instances 


because this reason is ,



we want maximum avilibity which is running into the services into ec2 machine. theses spot instances terminated based on the demands or resource pool .


those are terminated we will have the OnDemand ec2 instances.to serve our request.


---------------------------



now we want to launch the onedemand ec2 instances .


those instnaces we need to install the apache webservr\\


after installations we have to cross verify it 


one is ondemand 


and naother four is the 4 sopt instnaces 


all instnaces are runing right now.


inthis target am going to include the all intances which we are created.


-------------------------------------



miilino of requests are coming to ypur loadbalnacer then u just use the autoscalling furture to scale in or scale out those requests. whateer its spot instnaces or ondemand instnaces 



so how ,many ec2 instnaces are serve to the traffic.


--------------------------------



next craete the loadbalncer 


(what is loadbancer)


this target reads the resuest and send resquest restapective ec2 server (which is the one).


-------------------------------------



user sedns the request .first this request goes to 


----------------------


ruouitng will be do that automatically


in this way the requests  are routed to the ondemnad inatnces then it will go to the spot inatnces


so loadnalncers route the traffic to the insaces as weel as ondemans and spotinatnces


here we need to setupthe sutoscalling group


impaltenation of maximin avilibity of your onedmeand and sopt instnaces


--------------------



am going to chnage the stop the sopt instnaces


from onwarsd request will be serve by the iondemand ec2 insmavces



---------------------------------------------------



1).How many aws account do you handle? what to say for such questions?


2).How to chnage user from one group to naother group?


3).what if elb goes down and what is the solutions?


4).can we attach s3 to ec2 insmaces if not why? efs?


-------------------------------


1).what is the differenec between block stoarge ,object stoage , file stirage ?


linux interview questions:


1).what is the command of clear the disk space in linux /centos?


firstwe cabb execute the command like as the df -Th 


then we can execuet the command like as the


du -sh * 


In this way we can utilize the hoe mauch space is consuming on each directories and files .


/ home ///etc //mount 


based on that anylzations , which partuclar dorectory is sueful , whcih directory is going to be removing 


u will have wise judegenemrr 



manually removes the old files older then 1 o3 3 months 


 adys those files only we can remove it 


or lese we can write the script for that.which is used to analyze the which files is olders then 7 days ,you can remove on it . 


firest u will anaylsze . then remove the files and we can do the automate it ..


2).if cpu goes above of set threshold ,what could be the reason and what should be the troubleshooting steps into it?


first we have to execuet the command like as the ,


top or cat /proc/loadavg 


after execution commands we can check ot out the ,


whihc process are cosnsuming more cpu load and findout and notitwhere somewhere.


we ahve identified apache is prcess .its consuminf=g lots of cpu loads ..


now we have to check the logs .which is the particular request are coming are this authdic or thsese are geninue


we need to analyze are this coming into any sepcif interval,let us say every 1 hour or 2 hour 


based on that we will have to chekc heather any cron is running or any schdeule process is running .they will genrate the addtional trfafics .



secod thinsg ,


we will have to check the monitiong tool (0


if we are request are actually incresing ,those request are not geniue ,we will ahve to identify the logs .where from the request are comaing ,.what is the ipaddress.


we can block the ipaddress on firewaall


whatever the machnaiasam are using to secuer the traffic


maby whatever the firewaal , we can block all the reuqst which is unwanted


-----------


in this we have to increse the particular harward cpacity to handle the request .mayne request will be geniue in our linux os 


3).How to check disk read and write bytes .what is the command into this ?


iostat and dstat command into linux os 


iostat -xmt 1 11 or dtsta comand into linux os 


-----------------------


1).How to connect 10 vpc in differrnt regions ?


using vpc peering or vpc transist gateway 


or we will usin gthe tunnel to connect the 10 vpc's


but cidr's deosn't overlapping 


if you want connect two vpc's vpc's cidr should be different 




2).How to disturibute the applications laod ij different regions?


route 53 >> global loadbalncer 


mumbabi>>> singapore regions are there.


if mumbai resgins traffic goes fows , then custmer request is redirect to the singapore regiore resgions 


elastic loadlanncer are capable to distribute the trffic loads among the multiple avility zones 


route53 is a global loaganbalcer. so use can rouet 53 we can trafer the load between teh ediferent regions 



3).How to monitoer the 10 aws accounts inone central acconunt?




vpc connection is required for crntal account


cloudwatch or cloudwatch dashboard for all that coount .in that case like we will have to authdicate once again 

like our cloud watch and our particuar master account cloud watch have to access to the all othr account all the resorces whatver going to be monitoted 


like croos account ial role is given to monirot the other account into the centrak account


this cerntal account going to monirot be the all other account with the help of iam role


4).we craeted one autoscalling with the help of ami ,after craeting ami then devloper put code of partoicualr instnaces so how to use that code ?


crate the the latest ami amd upadte the autoscaling 


wrote the script and fetch sthe srcipt with alyest changes from git or s3 with the instance startup


mean time we have toattch the iam role and attch iwht the 


git with instnace . when instance sttartup the codes will be downloaded from git or s3 with help of iam role




-------------------------------------------


1).How many webservers are avilble in the target group?


first going to load testing. 


in this way we can check it out how many servers are avilble . how many servers are idelay have to be in target .


depending on the apalications are running into our servers



based on the performance of the applications ,based on the  respone time


based on that responese server we want , based on that user request , amount of load , latency we want 


different aspects as there.



2).Kindly explain the exac differnece between ri,spot and dedicated instances ?


3).If we are terminating ssl certificate on servers , then should we have one ssl certificate on each server?


in that case all the webservers having same ssl certificate . whnever ur ssll certifuctae going to be expired ,so in that case as well, all the webservers ,


in that case all the webserver should have ssl certificates.but if you want to terminate the ssl certificate on the top of elb or maybe hrdware loadbalncer . 


ideally we can terminate ssl certicate on elb


cdn >> elc>>webservers


4).what to answer if interviewer asked what challanges facd by you while working on aws . please list few.



1).connectivity issue in ec2 insace


2).kernel parnel issue in ec2 instances


3). netwrok interfcae is down from ec2 srver ,then stroubleshoot it


4).troubleshooting applications the high latency in ec2


5).if ec2 server public ip address iis chnaging the every reboot , then we will use the elastic loadbalncer on the top ec2 server and we will bind the elb pulinc dns into route53 in case this ipaddress are chnaging , then website is not go down . then elb send the private iapaddress to ec2 server.


6).rds upgrade 


7).s3 bucket policy while creating s3 ubcket plicy we ihad confusions . then i went through documnatation and get calrrifications on this.

8).vpc pereirng connectivity issue?


-----------------------------------------





based on that aspects we have to add more servers into target group




-----------------------------------------------------


1).Kindy explain exact diiference between RI , spot instances and dedicated instances?





--------------------------------------


1).How can i run multiple jobs at a time ?


crontabs 


all the cron job doesnot sttated at the same time .


we need to have the amoununt of time  of  gap for running all the jobs 



why its so is ,


maybe if we are running the 100 jobs at hours . its may lead load increaent or load extension on a particular server. one job going to take the 5 mins completion.after this job is complted we canexecuted other jobs as well


or lese it will leads the server extend .


2).you should horizontal scalling is not recommened .but for a scalble system,isn't horizontal scaling the best?


yes its the one


tagget grouo _> due to some resaon we have to incraese the no .of servers . 























Comments

Popular posts from this blog

Linux interview Questions :

AWs Interview Questions