Top AWS Interview Questions?

Top AWS Interview Questions?

Here is the list of top AWS Interview Questions. In this article, we will focus on Amazon EC2, Amazon Route53, and Amazon CloudFormation. We provide you with all important AWS interview questions and answers. 

Amazon EC2

In this section, you will learn about the AWS interview questions on the Amazon EC2 service. EC2 is a very popular service in AWS.

 

Question #1: What is the difference between stopping and terminating an EC2 instance? 

Answer #:  While you may consider that stopping and terminating an EC2 instance are similar, that’s not true; there is a distinction between them. When we stop an EC2 instance, it stops working but it’s not deleted. We can restart it again by selecting restart the instance from the action dropdown menu. But in the case of terminating an EC2 instance, we permanently delete the instance, and we can’t restart the terminated instance again.

 

Question #2: How many types of EC2 instances are provided by AWS?

Answer #: There are three types of EC2 instances, which are given below: 

  1. On-demand instance: It doesn’t require any commitment for the long term. You have full control of it. It is your choice when you want to start it, stop it or any action perform on it. You pay only when you use it. 
  2. Spot instance – It is cheaper than the on-demand instance and can be bought through bidding. 
  3. Reserved instance – It provides you with a huge discount on your EC2 instance usage cost. It provides you with a discount of up to 72%.

 

Question #3:  How do you set up SSH agent forwarding so that you do not have to copy the key every time you login?

Answer #: Here’s how you accomplish this:

  1. Go to your PuTTY Configuration 
  2. Go to the category SSH -> Auth 
  3. Enable SSH agent forwarding to your instance

 

Question #4: What are the Solaris and AIX operating systems? Are they available with AWS?

Answer #: Solaris is an operating system that runs on the SPARC processor architecture, which isn’t currently supported by Amazon.

  • AIX is an operating system that only runs on Power CPUs and not Intel CPUs, hence AIX instances couldn’t be created on EC2.
  • Because both operating systems have limitations, they are still not currently provided by AWS.

 

Question #5: How can an existing instance be connected to a new Auto Scaling group?

Answer #: The following is the procedure for connecting an existing EC2 instance to a new auto-scaling group:

  • Open EC2 console
  • Select your instance under Instances
  • Navigate to Actions -> choose Instance Settings -> then select Auto Scaling Group
  • Select a new Auto Scaling group
  • Attach this group to the Instance 
  • Edit the Instance if needed
  • Once completed, the instance can be successfully added to a new Auto Scaling group. 

 

Question #6: How can you recover/log in to an EC2 instance for which you have lost the key?

Answer #: If you have lost the access key of an EC2 instance, follow the steps outlined below to recover it:

  • Verify that the EC2Config service is running
  • Detach the root volume for the instance
  • Attach the volume to a temporary instance
  • Modify the configuration file
  • Restart the original instance 

 

Question #7: How do you configure CloudWatch to recover an EC2 instance?

Answer #: Here’s how you can configure them:

  • Create an Alarm using Amazon CloudWatch
  • In the Alarm section, go to the Define Alarm section then select -> Actions tab
  • Choose the Recover this Instance option 

 

Question #8: What are the common types of AMI designs?

Answer #: There are several varieties of AMIs; however, some of the most frequent are as follows:

  • Fully Baked AMI 
  • Just Enough Baked AMI (JeOS AMI)
  • Hybrid AMI

 

Amazon Route 53

In this section, you will learn about the AWS interview questions for the Amazon Route 53 service. This is also a very popular service, and many AWS interview questions come from this section.

 

Question #1: What is the difference between Latency Based Routing and Geo DNS?

Answer #: The Geo Depending DNS routing makes decisions based on the request’s geographic location. 

Latency Based Routing, on the other hand, uses latency measurements between networks and AWS data centers. Latency Based Routing is utilized when you wish to provide your clients with the lowest feasible latency.

Latency Based Routing is utilized when you wish to provide your clients with the lowest feasible latency. 

Geo-based routing, on the other side, is utilized when you wish to lead customers to different websites based on the nation or area from which they are visiting.

 

Question #2: What is the difference between a domain and a hosted zone?

Answer #: A domain is essentially a set of data that describes a self-contained administrative and technological entity. A domain is something like www.google.com.

A hosted zone is a container that stores information about how you wish to route internet traffic for a certain domain. drive.google.com, for example, is a hosted zone.

 

Question #3: How does Amazon Route 53 provide high availability and low latency?

Answer #: Here’s how Amazon Route 53 provides the resources in question: 

  • Globally distributed servers – Because Amazon is a worldwide service, it has DNS services all over the world. Any consumer submitting a query from anywhere in the globe will be routed to a DNS server in their area with low latency. 
  • Reliability – Route 53 delivers the consistency demanded by critical applications.
  • Optimal locations – Route 53 delivers the dependability required by critical applications.

 

Amazon CloudFormation

In this section, you will learn about the AWS interview questions for the Amazon CloudFormation service. This is a popular AWS service, and many AWS interview questions come from this section.

 

Question #1: How is AWS CloudFormation different from AWS Elastic Beanstalk?

Answer #: Here are some differences between AWS CloudFormation and AWS Elastic Beanstalk:

  • AWS CloudFormation assists you in establishing and identifying all infrastructure resources within your cloud environment. AWS Elastic Beanstalk, in contrast, provides a framework that makes it simple to install and execute cloud applications.
  • AWS CloudFormation supports the development needs of a diverse range of applications, such as legacy applications and existing enterprise applications.  AWS Elastic Beanstalk, in contrast, is integrated with developer tools that can help you in controlling the lifespan of your applications.

 

Question #2: What are the elements of an AWS CloudFormation template?

Answer #: AWS CloudFormation templates are YAML or JSON formatted text files that are comprised of five basic elements. They are:

  • Template parameters
  • Output values
  • Data tables
  • Resources
  • File format version

 

Question #3: What happens when one of the resources in a stack cannot be created successfully?

Answer #: If the resource in the stack cannot be created, then CloudFormation automatically rolls back and terminates all the resources that were created in the CloudFormation template. This is a very useful feature when you accidentally exceed your limit of Elastic IP addresses or don’t have access to an EC2 AMI.

 

Question #4: What are the steps involved in a CloudFormation solution?

Answer #: Here are the steps listed below:

  1. Create a new CloudFormation template or utilize an existing one in JSON or YAML format.
  2. Just save code inside an S3 bucket, that will act like a repository for this.
  3. To call the bucket and construct a stack on your template, use AWS CloudFormation. 
  4. CloudFormation scans the document and identifies the operations which are invoked, their chronology, and the connection between the functions before deploying them one by one.

Leave a Reply

Your email address will not be published. Required fields are marked *