Total Page Preview:   000000000144

Top AWS EC2 instance Interview Questions Answers for freshers and experienced

Question 1. What are the pricing models for EC2 instances?
Answer:The different pricing model for EC2 instances are as below,
  • On-demand
  • Reserved
  • Spot
  • Scheduled
  • Dedicated
 
Question 2. What are the types of volumes for EC2 instances?
Answer:
  • There are two types of volumes,
  • Instance store volumes
  • EBS – Elastic Block Stores
 
Question 3. What are the pricing models available in AWS EC2?
Answer:
  • On-Demand Instances
  • Reserved Instances
  • Spot Instances
  • Dedicated Host
 
Question 4. What are the types using in AWS EC2?
Answer:
  • General Purpose
  • Compute Optimized
  • Memory optimized
  • Storage Optimized
  • Accelerated Computing (GPU Based)
 
Question 5. What are the different types of instances?
Answer: Following are the types of instances,
  • General purpose
  • Computer Optimized
  • Storage Optimized
  • Memory Optimized
  • Accelerated Computing
 
Question 6. Troubleshooting with EC2 Instances: 
Answer: Instance States
  • If the instance state is 0/2- there might be some hardware issue
  • If the instance state is ½-there might be issue with OS. Workaround-Need to restart the instance, if still that is not working logs will help to fix the issue.
 
Question 7. How EC2instances can be resized.
Answer: EC2 instances can be resizable(scale up or scale down) based on requirement
 
Question 8. Maximum number of EC2 which can be created in VPC.
Answer:Maximum 20 instances can be created in a VPC. we can create 20 reserve instances and request for spot instance as per demand.
 
Question 9. How do you access the Ec2 which has private IP which is in private Subnet ?
Answer: We can access using VPN if the VPN is configured into that Particular VPC where Ec2 is assigned to that VPC in the Subnet. We can access using other Ec2 which has the Public access.
 
Question 10. What is an auto-scaling and what are the components?
Answer: Auto scaling allows you to automatically scale-up and scale-down the number of instances depending on the CPU utilization or memory utilization. There are 2 components in Auto scaling, they are Auto-scaling groups and Launch Configuration.
 
Question 11. What are reserved instances?
Answer: Reserved instances are the instance that you can reserve a fixed capacity of EC2 instances. In reserved instances you will have to get into a contract of 1 year or 3 years.
 
Question 12. What is an AMI?
Answer: AMI stands for Amazon Machine Image. AMI is a template that contains the software configurations, launch permission and a block device mapping that specifies the volume to attach to the instance when it is launched.
 
Question 13. What are the types of load balancers in EC2?
Answer: There are 3 types of load balancers,
Application load balancer
Network load balancer
Classic load balancer
 
Question 14. What is and ELB?
Answer: ELB stands for Elastic Load balancing. ELB automatically distributes the incoming application traffic or network traffic across multiple targets like EC2, containers, IP addresses.
 
Question 15. When I try to launch an ec2 instance i am getting Service limit exceed, how to fix the issue?
Answer: By default AWS offer service limit of 20 running instances per region, to fix the issue we need to contact AWS support to increase the limit based on the requirement
 
Question 16. Which type of load balancer makes routing decisions at either the transport layer or the Application layer and supports either EC2 or VPC.
Answer: Classic Load Balancer
 
Question 17. Which is virtual network interface that you can attach to an instance in a VPC?
Answer: Elastic Network Interface
 
Question 18. You have launched a Linux instance in AWS EC2. While configuring security group, you Have selected SSH, HTTP, HTTPS protocol. Why do we need to select SSH?
Answer: To verify that there is a rule that allows traffic from EC2 Instance to your computer
 
Question 19. You have an EC2 instance that has an unencrypted volume. You want to create another Encrypted volume from this unencrypted volume. Which of the following steps can achieve this?
Answer: Create a snapshot of the unencrypted volume (applying encryption parameters), copy the. Snapshot and create a volume from the copied snapshot
 
Question 20. You are running to website on EC2 instances can deployed across multiple Availability Zones with an Multi-AZ RDS MySQL Extra Large DB Instance etc. Then site performs a high number of the small reads and the write per second and the relies on the eventual consistency model. After the comprehensive tests you discover to that there is read contention on RDS MySQL. Which is the best approaches to the meet these requirements?
Answer:The Deploy Elasti Cache in-memory cache is running in each availability zone and Then Increase the RDS MySQL Instance size and the Implement provisioned IOPS.
 
Question 21. An startup is running to a pilot deployment of around 100 sensors to the measure street noise and The air quality is urban areas for the 3 months. It was noted that every month to around the 4GB of sensor data are generated. The company uses to a load balanced take auto scaled layer of the EC2 instances and a RDS database with a 500 GB standard storage. The pilot was success and now they want to the deploy take atleast 100K sensors.let which to need the supported by backend. You need to the stored data for at least 2 years to an analyze it. Which setup of following would you be prefer?
Answer: The Replace the RDS instance with an 6 node Redshift cluster with take 96TB of storage.
 
Question 22. You have an the EC2 Security Group with a several running to EC2 instances. You changed to the Security of Group rules to allow the inbound traffic on a new port and protocol, and then the launched a several new instances in the same of Security Group.Such the new rules apply?
Answer:The Immediately to all the instances in security groups.
 
 
Question 23. The user has created an the applications, which will be hosted on the EC2. The application makes calls to the Dynamo DB to fetch on certain data. The application using the DynamoDB SDK to connect with the EC2 instance. Which of respect to best practice for the security in this scenario?
Answer: The user should be attach an IAM roles with the DynamoDB access to EC2 instance.
 
Question 24. You have an application are running on EC2 Instance, which will allow users to download the files from a private S3 bucket using the pre-assigned URL. Before generating to URL the Q101) application should be verify the existence of file in S3. How do the application use the AWS credentials to access S3 bucket securely?
Answer:An Create an IAM role for the EC2 that allows list access to objects in S3 buckets. Launch to instance with this role, and retrieve an role’s credentials from EC2 Instance make metadata.
 
Question 25. You are designing a multi-platform of web application for the AWS. The application will run on the EC2 instances and Till will be accessed from PCs, tablets and smart phones.Then Supported accessing a platforms are Windows, MACOS, IOS and Android. They Separate sticky sessions and SSL certificate took setups are required for the different platform types. Which do describes the most cost effective and Like performance efficient the architecture setup?
Answer:Assign to multiple ELBs an EC2 instance or group of EC2 take instances running to common component of the web application, one ELB change for each platform type.Take Session will be stickiness and SSL termination are done for the ELBs.
 
 
Question 26. Your application currently is leverages AWS Auto Scaling to the grow and shrink as a load Increases/decreases and has been performing as well. Your marketing a team expects and steady ramp up in traffic to follow an upcoming campaign that will result in 20x growth in the traffic over 4 weeks. Your forecast for approximate number of the Amazon EC2 instances necessary to meet peak demand is 175. What should be you do avoid potential service disruptions during the ramp up traffic?
Answer: Check the service limits in the Trusted Advisors and adjust as necessary, so that forecasted count remains within the limits.
 
Question 27. You have a web application running on the six Amazon EC2 instances, consuming about 45% of resources on the each instance. You are using the auto-scaling to make sure that a six instances are running at all times. The number of requests this application processes to consistent and does not experience to spikes. Then application are critical to your business and you want to high availability for at all times. You want to the load be distributed evenly has between all instances. You also want to between use same Amazon Machine Image (AMI) for all instances. Which are architectural choices should you make?
Answer: Deploy to 3 EC2 instances in one of availability zone and 3 in another availability of zones and to use of Amazon Elastic is Load Balancer.
 
Question 28. To serve the Web traffic for a popular product to your chief financial officer and IT director have purchased 10 m1.large heavy utilization of Reserved Instances (RIs) evenly put spread across two availability zones: Route 53 are used to deliver the traffic to on Elastic Load Balancer (ELB). After the several months, the product grows to even more popular and you need to additional capacity As a result, your company that purchases two c3.2xlarge medium utilization RIs You take register the two c3.2xlarge instances on with your ELB and quickly find that the ml of large instances at 100% of capacity and the c3.2xlarge instances have significant to capacity that’s can unused Which option is the most of cost effective and uses EC2 capacity most of effectively?
Answer: To use a separate ELB for the each instance type and the distribute load to ELBs with a Route 53 weighted round of robin.
 
Question 29. An AWS customer are deploying an web application that is the composed of a front-end running on the Amazon EC2 and confidential data that are stored on the Amazon S3. The customer security policy is that all accessing operations to this sensitive data must authenticated and authorized by centralized access to management system that is operated by separate security team. In addition, the web application team that be owns and administers the EC2 web front-end instances are prohibited from having the any ability to access data that circumvents this centralized access to management system. Which are configurations will support these requirements?
Answer:The configure to the web application get authenticate end-users against the centralized access on the management system. Have a web application provision trusted to users STS tokens an entitling the download of the approved data directly from a Amazon S3
 
Question 30. What is EC2? What are the benefits in EC2?
Answer: Amazon Elastic compute cloud is a web service that provides resizable compute capacity in the cloud.AWS EC2 provides scalable computing capacity in the AWS Cloud. These are the virtual servers also called as an instances. We can use the instances pay per use basis.
Benefits:
  • Easier and Faster
  • Elastic and Scalable
  • High Availability
  • Cost-Effective
 
 
Question 31. How to Addressing AWS EC2 instances?
Answer:
  • Public Domain name system (DNS) name: When you launch an instance AWS creates a DNS name that can be used to access the
  • Public IP: A launched instance may also have a public ip address This IP address assigned from the address reserved by AWS and cannot be specified.
  • Elastic IP: An Elastic IP Address is an address unique on the internet that you reserve independently and associate with Amazon EC2 instance. This IP Address persists until the customer release it and is not tried to
  •  
Question 32. What is Security Group?
Answer: AWS allows you to control traffic in and out of your instance through virtual firewall called Security groups. Security groups allow you to control traffic based on port, protocol and source/Destination.
 
Question 33. When your instance show retired state?
Answer:Retired state only available in Reserved instances. Once the reserved instance reserving time (1 yr/3 yr) ends it shows Retired state.
 
Question 34. Scenario: My EC2 instance IP address change automatically while instance stop and start. What is the reason for that and explain solution?
Answer:AWS assigned Public IP automatically but it’s change dynamically while stop and start. In that case we need to assign Elastic IP for that instance, once assigned it doesn’t change automatically.
 
Question 35. What is Elastic Beanstalk?
Answer:AWS Elastic Beanstalk is the fastest and simplest way to get an application up and running on AWS.Developers can simply upload their code and the service automatically handle all the details such as resource provisioning, load balancing, Auto scaling and Monitoring.
 
Question 36. What is EBS?
Answer:Amazon EBS Provides persistent block level storage volumes for use with Amazon EC2 instances. Amazon EBS volume is automatically replicated with its availability zone to protect component failure offering high availability and durability. Amazon EBS volumes are available in a variety of types that differ in performance characteristics and Price.
 
Question 37. How to compare EBS Volumes?
Answer:
  • Magnetic Volume: Magnetic volumes have the lowest performance characteristics of all Amazon EBS volume types.
  • EBS Volume size: 1 GB to 1 TB Average IOPS: 100 IOPS Maximum throughput: 40-90 MB
  • General-Purpose SSD: General purpose SSD volumes offers cost-effective storage that is ideal for a broad range of workloads. General purpose SSD volumes are billed based on the amount of data space provisioned regardless of how much of data you actually store on the volume.
  • EBS Volume size: 1 GB to 16 TB Maximum IOPS: upto 10000 IOPS Maximum throughput: 160 MB
  • Provisioned IOPS SSD: Provisioned IOPS SSD volumes are designed to meet the needs of I/O intensive workloads, particularly database workloads that are sensitive to storage performance and consistency in random access I/O throughput. Provisioned IOPS SSD Volumes provide predictable, High performance.
  • EBS Volume size: 4 GB to 16 TB Maximum IOPS: upto 20000 IOPS Maximum throughput: 320 MB
 
Question 38. What is cold HDD and Throughput-optimized HDD?
Answer:
  • Cold HDD: Cold HDD volumes are designed for less frequently accessed workloads. These volumes are significantly less expensive than throughput-optimized HDD volumes.
  • EBS Volume size: 500 GB to 16 TB Maximum IOPS: 200 IOPS Maximum throughput: 250 MB
  • Throughput-Optimized HDD: Throughput-optimized HDD volumes are low cost HDD volumes designed for frequent access, throughput-intensive workloads such as big data, data warehouse.
  • EBS Volume size: 500 GB to 16 TB Maximum IOPS: 500 IOPS Maximum throughput: 500 MB
 
Question 39. What is Amazon EBS-Optimized instances?
Answer: Amazon EBS optimized instances to ensure that the Amazon EC2 instance is prepared to take advantage of the I/O of the Amazon EBS Volume. An amazon EBS-optimized instance uses an optimized configuration stack and provide additional dedicated capacity for Amazon EBS I/When you select Amazon EBS-optimized for an instance you pay an additional hourly charge for that instance.
 
Question 40. What is EBS Snapshot?
Answer:
  • It can back up the data on the EBS Volume. Snapshots are incremental backups.
  • If this is your first snapshot it may take some time to create. Snapshots are point in time copies of volumes.
 
Question 41. How to connect EBS volume to multiple instance?
Answer: We can’t able to connect EBS volume to multiple instance, but we can able to connect multiple EBS Volume to single instance.
 
Question 42. What are the virtualization types available in AWS?
Answer: Hardware assisted Virtualization: HVM instances are presented with a fully virtualized set of hardware and they executing boot by executing master boot record of the root block device of the image. It is default Virtualization.
Para virtualization: This AMI boot with a special boot loader called PV-GRUB. The ability of the guest kernel to communicate directly with the hypervisor results in greater performance levels than other virtualization approaches but they cannot take advantage of hardware extensions such as networking, GPU etc. Its customized Virtualization image. Virtualization image can be used only for particular service.
 
 
Question 43. Is it conceivable to push off S3 with EC2 examples ?
Answer:Truly, it very well may be pushed off for examples with root approaches upheld by local event stockpiling. By utilizing Amazon S3, engineers approach the comparative to a great degree versatile, reliable, quick, low-valued information stockpiling substructure that Amazon uses to follow its own overall system of sites. So as to perform frameworks in the Amazon EC2 air, engineers utilize the instruments giving to stack their Amazon Machine Images (AMIs) into Amazon S3 and to exchange them between Amazon S3 and Amazon EC2. Extra use case may be for sites facilitated on EC2 to stack their stationary substance from S3.
 
Question 44. Clarify the highlights of Amazon EC2 administrations.
Answer:Amazon EC2 administrations have following highlights:
  • Virtual Computing Environments
  • Proffers Persistent capacity volumes
  • Firewall approving you to indicate the convention
  • Pre-designed layouts
  • Static IP address for dynamic Cloud Computing
 
Question 45. What is Status Checks in AWS Ec2?
Answer: System Status Checks – System Status checks will look into problems with instance which needs AWS help to resolve the issue. When we see system status check failure, you can wait for AWS to resolve the issue, or do it by our self.
  • Network connectivity
  • System power
  • Software issues Data Centre’s
  • Hardware issues
  • Instance Status Checks – Instance Status checks will look into issues which need our involvement to fix the issue. if status check fails, we can reboot that particular instance.
  • Failed system status checks
  • Memory Full
  • Corrupted file system
  • Kernel issues
 
Question 46.Process to mount EBS to EC2 instance
Answer:
  • Df –k
  • mkfs.ext4 /dev/xvdf
  • Fdisk –l
  • Mkdir /my5gbdata
  • Mount /dev/xvdf /my5gbdata

 

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: