AWS Intervie w Questions

 AWS VPC Transist gateway into aws environment:






why we neeed

9 steps we have to setiup the vpc transist gateway :


we need to craete the name ,descritpions,


configure the transist gateway:


here we can see the asn(amazon side autonomus system number)


if you don't put anything in aws side ,in aws side is going to be assign you .


am not going to put any number here.


this is the route identification number .


you need to put some route identification number . so that when we are craeting the trsis gatway ,so vpc find that route based on that number an then communiacat eiwth the vpc 


next configuret the corss -account shring options


transist gateway cidr blog


crate dag 


craete the transist gateway 



we should create the transist gateway attachement :



stilll all the vpc's is not going to be attcahed with the transist gateway :


so am going to attch the vpc's into the vpc transist gateway.


here am going to create the all the vpc's is attached to the vpc transist gateway . 


we have to attched by one by one 


we ned to craete attachement all vpc's


name .


tansis agteway id = (one tanssit gateway)



attachement type:


choose vpc 



vpc attchanemt :


choose vpc1


it will show the all the subnets 


create the dag 


carete the attchement i vpc attachement .


same thinsg its also happens for other vpc's attchement as well.


tansist gateway vs vpc perring into aws:


so we can crate the single tansis gateway and we can attach the multiple vpc's


vpc peering :


1 vpc peering we have the vpc 1 and vpc2 


another vpc peering we have the vpc2 and vpc3 


because vpc1 and vpc2 id not prrfer for another vpc3 


that's the drawback of our vpc peering .



if vpc's we ahve we can craete the muplitple vpc peering .


thats y transist gateway is more efficient for vpc peering .


if u have more then 50vpc's then i would recommended the 

vpc transits gateway


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



then next we are going to craete the update routes:

first update the route table of vpc1

here u can see, '''



now we want to reach out the vpc2 



now we need to attach vpc2 and vpc 3 without vpc 1



now we are working on vpc 2 attachment :


here am going to attach and vpc1 and vpc 3 with the help of vpc 2 attachment


now we can take the vpc 3


now vpc 3 is sued to attach with the vpc 1 and vpc2 with the help of vpc3 attachment


after that vpc3 will talk to an vpc1 and vpc2


now login into the ec2 server.


and shh to the all the from  vpc1 ,vpc2,vpc3)

and trying to crul for  other ec2 server


curl for each ec2 server which we are created .


i need all private ipaddress for all those ec2 servers


1).curl ec2 server-2

2)curl ec2 server-3


from vpc 1 via we can access the vpc 1 and vpc2


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





2).what is Autosalling group policy:


3).ec2 user data into aws environment :


why do we need the user data into ec2 server?


whenever you want to preinstalled certain packages for your ec2 server, then u will use the user data script.


its called as the bootstrapping 



in this user data section we need to write the some bash script apache2 , docker . whenever awe are start the ec2 machines , those packages are preinstalled into ec2 machine.


benefits :



you don't need to install the packages for again :


already this mention it bash script format 


time consumption is less.


development process.



am going to tale the ecxpmape of apache 2:



yes | sudo apt upadte


yes | sudo apt-get install apache2


after am checking the webserver is working fyne or not


in this way we can verify the whether webserver is working fyne or not.



then am goin to edit the user data if u want it .


choose ec2 server which you want it . then go to the instance settings --> edit user data option it will be there.


if you don't want willting to write the any user data script and manually also we can upload the shell script into thus .


check the log files :

tail -3000 /var/log/cloud-init-output.log.






Comments

Popular posts from this blog

Linux interview Questions :

AWs Interview Questions