Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers for 'Amazon' - 304 question(s) found - Order By Newest | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. Composition - has-a relationship between objects. Inheritance - is-a relationship between classes. Composition - Composing object holds a reference to composed objects and hence relationship is loosely bound. Inheritance - Derived object carries the base class definition in itself and hence its tightly bound. Composition - Used in Dependency Injection Inheritance - Used in Runtime Polymorphism Composition - Single class objects can be composed within multiple classes. Inheritance - Single class can only inherit 1 Class. Composition - Its the relationship between objects. Inheritance - Its the relationship between classes. | ||||
![]() ![]() | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. 1.Abstraction solves the problem at design level while encapsulation solves the problem at implementation level 2.Abstraction is used for hiding the unwanted data and giving relevant data. while Encapsulation means hiding the code and data into a single unit to protect the data from outside world. 3. Abstraction lets you focus on what the object does instead of how it does it while Encapsulation means hiding the internal details or mechanics of how an object does something. 4.For example: Outer Look of a Television, like it has a display screen and channel buttons to change channel it explains Abstraction but Inner Implementation detail of a Television how CRT and Display Screen are connect with each other using different circuits , it explains Encapsulation. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. Underlying data structure for ArrayList is Array whereas LinkedList is the linked list and hence have following differences - 1. ArrayList needs continuous memory locations and hence need to be moved to a bigger space if new elements are to be added to a filled array which is not required for LinkedList. 2. Removal and Insertion at specific place in ArrayList requires moving all elements and hence leads to O(n) insertions and removal whereas its constant O(1) for LinkedList. 3. Random access using index in ArrayList is faster than LinkedList which requires traversing the complete list through references. 4. Though Linear Search takes Similar Time for both, Binary Search using LinkedList requires creating new Model called Binary Search Tree which is slower but offers constant time insertion and deletion. 5. For a set of integers you want to sort using quicksort, it's probably faster to use an array; for a set of large structures you want to sort using selection sort, a linked list will be faster. | ||||
![]() ![]() | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. Abstract classes can have both abstract methods ( method declarations ) as well as concrete methods ( inherited to the derived classes ) whereas Interfaces can only have abstract methods ( method declarations ). A class can extend single abstract class whereas it can implement multiple interfaces. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. EFS is file storage whereas S3 is object storage. EFS is filesystem presented over IP network as normal OS drive, while S3 is HTTP accessed store. EFS is capable of being mounted whereas S3 doesn't. S3 has capabilities beyond just filesystem, there is whole metadata part where you can store info about your objects in S3. As S3 is accessed over http , it's capable of hosting a static web site on it's own whereas EFS needs a computing and frontend service to have such capability. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. AMI is an Amazon Machine Image. It contains the configuration to enable to boot up an EC2 instance with said configuration whereas Cloud formation is a templating language that allows to describe how to build a VPC and also allows you to create AWS services AMI is templating specific to instances whereas the scope of CloudFormation templating is much bigger. CloudFormation could use AMI for launching instances along with other services. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. CloudFront for Static Media and cached content EC2 and EKS ( Docker ) for main application computing RDS and DynamoDB for Database Lambda ( computing ) for running back end cron jobs Kinesis for streaming and SQS for queuing CloudWatch for Monitoring CloudFormation for Infrastructure templating S3 for Object Storage | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. A Region is a Geographical entity like US-East , US-West etc. Each Region may have multiple availability zones where each zone comprise of 1 or more Data Center located with each other. Edge Locations are the sites that hosts cached content for faster delivery and for saving network traffic as they feed content from sites that are local or near to consumption. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. S3 Standard S3 IA - Infrequently Accessed S3 One Zone IA - One Zone only , Infrequently Accessed S3 Glacier - achieved S3 Standard is most expensive , Glacier is least expensive | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Storage Tier ( IA , Standard , Glacier etc ) Storage ( Volume of Data ) No of Requests Meta Data Data Transfer Speed acceleration through cache and Edge Location | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. EC2 - Time and Reservation , Instance Type ( Memory , Computation power ) S3 - Accessibility Frequency , Data Transfer , Storage Space CloudFront - Geography, No of Locations EBS - IOPS, Access Frequency | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Simple Weighted Latency Failover GeoLocation Multivalue | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. A VPC is devided into multiple subnets. Subnet in a particular VPC could be public or private. For Example - A particular account may have multiple vpc's for each of the business type. For each Business or VPC , One can have different subnets to cater to each department so that access across departments could be restricted. But still there could be identities that have control over different subnets. Moreover we could have multiple subnets for each department so as to have distinguished public and private networks having different types of applications ( public facing or internal consumption ) | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Process is a program in execution whereas thread is a separate path of execution in a program. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Single instance means there is only 1 instance that will bear all the traffic load whereas Load balanced server means that there will be a cluster of servers that will host the application and load will be balanced distributed among them. Auto Scaling means that the number of instances will be expanded / shrunken based on the rule. Rule could be the traffic count , response time etc. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Cloud Computing is a way of using IT infrastructure with following traits - 1. On Demand Infrastructure 2. Broad Network Access 3. Resource Pooling 4. Rapid Elasticity 5. Measured Service | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. AWS provides various types of services like Computing ( EC2 , Lambda , EKS ), Storage ( S3, Glacier ), Database ( RDS , DynamoDB ), Streaming ( Kinesis ), Queue ( SQS ), Security and Access ( IAM ) etc. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Warm up time for certain technologies like Java ( JVM Warmup ) Performance Size of Deployable ( Bigger size packaging should go in S3 ) | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Cloud Formation does not have any additional cost but you are charged for the underlying resources it builds. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. In AWS Lambda we can run a function in synchronous or asynchronous mode. In synchronous mode, if AWS Lambda function fails, then it will just give an exception to the calling application. In asynchronous mode, if AWS Lambda function fails then it will retry the same function at least 3 times.If AWS Lambda is running in response to an event in Amazon DynamoDB or Amazon Kinesis, then the event will be retried till the Lambda function succeeds or the data expires. In DynamoDB or Kinesis, AWS maintains data for at least 24 hours. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. A template for the instance. Launch permission decisions A block device mapping, when an instance is launched it determines the volumes to attach to that instances. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Because it gives the ability to provision infrastructure on Demand with No contracts and strings attached. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. US-East Virginia This is the oldest and most popular region. All new features are rolled first in this region and hence they are first available there. The downside is that because of experimentation with new services, unavailability time is quite high. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. It saves Network traffic and facilitates faster delivery by hosting bulk media and cached data near to client. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. effect means whether the effect of this Policy is to allow or deny, action means the type of action ( read , write ) and service, and resource is the resource where this should apply. For example - If we want to have a Policy of providing read access on S3 , effect will be "allow" action will be "s3:GetObject" resource will be "arn:aws:s3:::examplebucket/*" | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Because new files will be fed from where ever they are first available but AWS have no way to identify which is the most updated version among the various regions. The updated version can only be assured once the replication to all availability zones is complete. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We should only allow access that's needed. So the security Policy should be as restrictive as possible. Buckets and Files should never be made public unless until they are needed it to be like that. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Versioning ( will create Delete marker ) MFA Delete ( authentication upon deletion ) Cross Region Replication ( Replicates aren't deleted ) | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We can select the appropriate Price Class if that suits us. We can do Geo Targeting by black listing / white listing certain geographies. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||