Basic Aws- interview Question

 Basic Aws- interview Question 


1)    How are Spot Instance, On-demand Instance, and Reserved Instance different from one another?

 

Both Spot Instance and On-demand Instance are models for pricing.

Spot Instance

On-demand Instance

With Spot Instance, customers can purchase compute capacity with no upfront commitment at all.

With On-demand Instance, users can launch instances at any time based on the demand.

Spot Instances are spare Amazon instances that you can bid for.

On-demand Instances are suitable for high-availability needs of applications.

When the bidding price exceeds the spot price, the instance is automatically launched, and the spot price fluctuates based on supply and demand for instances.

On-demand Instances are launched by users only with the pay-as-you-go model.

When the bidding price is less than the spot price, the instance is immediately taken away by Amazon.

On-demand Instances will remain persistent without any automatic termination from Amazon.

Spot Instances are charged on an hourly basis.

On-demand Instances are charged on a per-second basis

 

I have some private servers on my premises, also I have distributed some of my workload on the public cloud, what is this architecture called?

A)   Virtual Private Network

B)   Private Cloud

C)   Virtual Private Cloud

D)   Hybrid Cloud

 

Answer will be Hybrid Cloud

 

Explanation: This type of architecture would be a hybrid cloud. Why? Because we are using both, the public cloud, and your on premises servers i.e the private cloud. To make this hybrid architecture easy to use, wouldn’t it be better if your private and public cloud were all on the same network(virtually). This is established by including your public cloud servers in a virtual private cloud, and connecting this virtual cloud with your on premise servers using a VPN(Virtual Private Network).

 

 What does the following command do with respect to the Amazon EC2 security groups?

ec2-create-group CreateSecurityGroup

 

A)   Groups the user created security groups into a new group for easy access

B)   Creates a new security group for use with your account.

C)   Creates a new group inside the security group.

D)   Creates a new rule inside the security group.

Answer B.

Explanation: A Security group is just like a firewall, it controls the traffic in and out of your instance. In AWS terms, the inbound and outbound traffic. The command mentioned is pretty straight forward, it says create security group, and does the same. Moving along, once your security group is created, you can add different rules in it. For example, you have an RDS instance, to access it, you have to add the public IP address of the machine from which you want access the instance  in its security group.

3) You have a distributed application that periodically processes large volumes of data across multiple Amazon EC2 Instances. The application is designed to recover gracefully from Amazon EC2 instance failures. You are required to accomplish this task in the most cost effective way.

Which of the following will meet your requirements?

A)   Spot Instances

B)   Reserved Instances

C)   Dedicated Instances

D)   On Demand Instances

Answer: A

Explanation: Since the work we are addressing here is not continuous, a reserved instance shall be idle at times, same goes with On Demand instances. Also it does not make sense to launch an On Demand instance whenever work comes up, since it is expensive. Hence Spot Instances will be the right fit because of their low rates and no long term commitments.

 

4) How is stopping and terminating an instance different from each other?

Starting, stopping and terminating are the three states in an EC2 instance, let’s discuss them in detail:

Stopping and Starting an instance: When an instance is stopped, the instance performs a normal shutdown and then transitions to a stopped state. All of its Amazon EBS volumes remain attached, and you can start the instance again at a later time. You are not charged for additional instance hours while the instance is in a stopped state.

Terminating an instance: When an instance is terminated, the instance performs a normal shutdown, then the attached Amazon EBS volumes are deleted unless the volume’s deleteOnTermination attribute is set to false. The instance itself is also deleted, and you can’t start the instance again at a later time.

5) How will you access the data on EBS in AWS ?

Elastic block storage as the name indicates provides persistent, highly avaialble and high performance block level storage that can be attached to a running EC2 instance. The storage can formatted and mounted as a file system or the raw storage can be accessed directly

6)  What is the boot time for an instance store backed instance ?

 

The boot time for an Amazon Instance Store -Backed AMI is usually less than 5 minutes.

7) Is it possible to vertically scale on an Amazon Instance?  If yes, how ?

 

Following are the steps to scale an Amazon Instance vertically –

·         Spin up a larger Amazon instance than the existing one.

·         Pause the exisiting instance to remove the root ebs volume from the server  and discard.

·         Stop the live running instance and detach its root volume.

·         Make a note of the unique device ID and attach that root volume to the new server.

·         Start the instance again.

 

 

 

 

7) What is the total number of buckets that can be created in AWS by default ?

 

100 buckets can be created in each of the AWS accounts. If additional buckets are required, increase the bucket limit by submitting a service limit increase.

 

8)  Is it possible to cast-off S3 with EC2 instances ? If yes, how ?

 

It is possible to cast-off S3 with EC2 instances using root approaches backed by native occurrence storage.

 

9)   How will you configure an instance with the application and its dependencies , and make it ready to serve traffic?

 

You can acheive this with the use of lifecycle hooks. They are powerful as they let you pause the creation or termination of an instance so that you can sneak peak in and perform custom actions like configuring the instance, downloading the required files, and any other steps that are required to make the instance ready.Every auto scaling group can have multiple lifecycle hooks.

 

10) What are the important features of a classic load balancer in EC2 ?

 

·         The high availability feature ensures that the traffic is distributed among EC2 instances in single or multiple availability zones.This ensures high scale of availability for incoming traffic.

·         Classic load balancer can decide whether to route the traffic or not based on the results of health check.

·         You can implement secure load balancing within a network  by creating security groups in a VPC.

·         Classic load balancer supports sticky sessions which ensure that the traffic from a user is always routed to the same instance for a seamless experience.

 

11)  Will you use encryption for S3 ?

 

It is better to consider encryption for sensitive data on S3 as it is a proprietary technology.

 

12) How will you bind the user session with a specific instance in ELB (Elastic Load Balancer) ?

 

This can be achieved by enabling Sticky Session.

 

13) What are the possible connection issues you encounter when connecting to an EC2 instance ?

 

·         Unprotected private key file

·         Server refused key

·         Connection timed out

·         No supported authentication method available

·         Host key not found,permission denied.

·         User key not recognized by the server, permission denied.

 

14) What is the difference between Amazon S3 and EBS ?

 


Amazon S3

EBS

 

Paradigm

Object Store

Filesystem

Security

Private Key or Public Key

Visible only to your EC2

Redundancy

Across data centers

Within the data center

Performance

Fast

Superfast

 

15) Can you run multiple websites on an EC2 server using a single IP address?

 

More than one elastic IP is required to run multiple websites on EC2.

 

16) What happens when you reboot an EC2 instance?

 

Rebooting an instance is just similar to rebooting a PC. You do not return to image’s original state, however, the contents of the hard disk are same as before the reboot.

 

 

17) What are the storage class available in Amazon s3?

 

·          Amazon S3 standard

·          Amazon S3 standard-infrequent Access

·          Amazon S3 Reduced Redundancy Storage

·          Amazon Glacier

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Comments

Post a Comment

Popular posts from this blog

300 +DevOps Interview Questions and Answers

Kubernetes installation step-by-step in various OS