AWS Interview Questions and Answers

AWS Interview Questions and Answers: Storage & Compute

With 33% market share in cloud computing, Amazon Web Service(AWS) is the leader among cloud service providers. As companies require more experts to design, deploy and manage cloud, you too should get familiar with frequently asked AWS interview questions and become future-ready. The topics we will be covering are:  

  • AWS Storage: S3, EBS & Glacier  
  • AWS Computing: Amazon EC2, Elastic Beanstalk & Lambda 
  • General AWS Interview Questions  

AWS Storage: S3, EBS & Glacier 

How does a user gain access to a particular bucket? 

Below are the four steps to allow users to access a specific bucket.  

  1. Categorize your instances
  2. Define rules for how authorized users can manage specific servers
  3. Lockdown your tags
  4. Change the user's IAM permissions 


What is AWS S3 Bucket? What can be its maximum size? 

AWS S3 bucket is a public storage resource in the cloud in the Simple Storage Service. So it is a container that holds the data object and its metadata. S3 buckets can have a maximum size of 5 terabytes. 


What are the key features of AWS S3? 

  • Lifecycle management: S3 provides a low-cost and effective solution to store and manage objects. 
  • Data Protection: S3 imparts implicit methods of effective and robust data protection of its objects. 
  • Low cost: With its payment-per-use model, S3 proves to be inexpensive in implementing applications. 
  • Scalable: S3 is highly scalable and elastic and can be leveraged in applications that can foresee growth. 
  • Integration with AWS Services: S3 can be integrated with AWS services which makes it easier to implement. 


Which AWS service can aggregate data across different AWS accounts? 

The AWS Config service delivers configuration updates from multiple AWS accounts to a single S3 bucket. However, before aggregating the data, AWS ensures that all relevant IAM policies are applied to the S3 bucket.  


How to upload a larger file(greater than 100MB) in Amazon S3? 

You can use two methods to upload large files in AWS Storage 

  1. Manual Upload: Split the file into chunks of permissible sizes and then manually upload to the AWS S3. 
  2. Multipart upload: Use the AWS Command Line Interface (CLI) with all the high-level AWSS3 commands that automatically perform a multipart upload on a large object. 


What is the default storage in S3 and what are the different storage types available? 

The default storage class in Amazon S3 is STANDARD. You cannot change the default class but you can opt-out of different storage classes available based on various use-cases. 

All the storage classes that Amazon S3 offers are: 

  • S3 Standard: You use this class for storing frequently accessed data. 
  • S3 Intelligent: This class is for tiering for data according to changing or undefined access patterns. 
  • S3 Standard: Used for data that you access less frequently. 
  • S3 One Zone: You use this class when data is infrequently accessed but is needed for long life.  
  • Amazon S3 Glacier and Amazon S3 Glacier Deep Archive: This is ideal for long-term data archive and preservation. 

How do we send a request to S3? 

Amazon S3 is a REST service. You can use the REST API or the AWS SDK wrapper libraries to send a request to the S3 service. 


Differentiate between AWS S3 and Amazon Elastic Block Store(EBS). 

Difference between EBS and Instance Store 


How to automate EC2 backup using EBS? 

  1. Acquire a list of instances. Then connect to AWS through APIs which help you list the Amazon EBS volumes that are locally attached to the instance. 
  2. List the snapshots available in each volume. Next, assign a retention period to each snapshot. Then create new snapshots for every single volume. 
  3. If the snapshot has surpassed the retention period, then make sure you delete it. 


What are the benefits of EBS? 

  • Data availability: An EBS volume is automatically replicated in its region when it's created. 
  • Data persistence: EBS volume is independent of the cloud instance, therefore, can persist on its own.  
  • Data encryption: All EBS volumes are encrypted using the Amazon EBS encryption feature which ensures the data is secure. 
  • Snapshots: EBS can create a snapshot or a backup of a volume independently and store it in multiple availability zones. 
  • Flexibility: EBS volumes are flexible to the point that they can be configured in live environments too without any interruptions. 


What is the way to auto-delete old snapshots? 

  1. Take snapshots of the EBS volumes on Amazon S3. 
  2. Use AWS Ops Automator which enables automatic handling of all the snapshots. The automation enables the creation, deletion, and copying of Amazon EBS snapshots. 


Which is better between Amazon S3 and Amazon S3 Glacier? 

AWS S3 is a secure simple and robust storage service that provides a scalable solution. However, S3 Glacier is better for implementing a low-cost archiving and backup solution for applications. Glacier has easier administration tools and provides better integration with all other applications like IoT, mobile applications, etc. 


What is an archive and why is it used? 

A cloud archive is a long-term object storage, available as storage-as-a-service for long-term data retention of infrequently accessed data. A cloud archive is generally done in a public cloud 

In AWS, the archives can deliver 99.999999999% durability and are compliant with data regulations that meet even the most rigid regulatory demands.   

To manage the low cost of accessing archives, and yet suitable for varying retrieval needs, Amazon S3 Glacier provides three options from a few minutes to several hours. On the other hand, Amazon S3 Glacier Deep Archive gives two options, ranging from 12 to 48 hours, to access archives. 


AWS Computing: Amazon EC2, Elastic Beanstalk & Lambda

What are the key benefits of cloud computing? 

  • It reduces the cost of building and maintaining IT infrastructure systems. 
  • Cloud provides scalability, i.e. it allows businesses to grow and expand as per needs. 
  • High availability, as it provides a robust data protection system for a continuance to the business operations. 
  • Infuses flexibility in the operations for the businesses. 
  • Facilitates automation in processing and updating applications and systems. 


What are the benefits of Amazon EC2? 

Amazon Elastic Cloud Compute (EC2) is a web service that facilitates scalable computing capacity. It works as IaaS (Infrastructure as a Service). The benefits of EC2 are: 

  • It is extremely reliable wherever instances are replaced rapidly. 
  • Infusion of Amazon VPC with EC2, within a specific range of IPs, makes it highly secure. 
  • The multiple choices of instances facilitate flexibility. 
  • It is cost-saving as the user can scale it according to the requirements. 


What is serverless architecture?

Serverless architecture or serverless computing is based on the concept of Function as a Service (FaaS). It is a design pattern that includes third-party service-hosted applications. Thus, the serverless architecture frees the developer from the responsibilities of managing hardware and server. The application here is divided into smaller functions that the user can invoke and scale individually. 

Image from


Mention the different types of Amazon EC2 instances according to their cost

  • On-Demand Instances: The cloud provider calculates charges according to the computing capacity used per hour. Thus, pricing for on-demand instances increases or decreases according to the demand of the company. These are low-cost when used for a short period, but costly when used long-term.  
  • Reserved Instances: It is ideal for requirements where the user needs an instance for over a year. 
  • Spot InstancesAllow users to bid on the computing capacity of spare AWS EC2. It is more cost-effective than on-demand instances. 


If you lose the key, is there a way to recover your EC2 instance?

Yes, you can recover/login to an EC2 instance after losing a key by following the below steps: 

  1. Make sure that the EC2Config service is up and running.
  2. Detach the root volume for the instance. 
  3. Attach the volume to a temporary instance.
  4. Modify the configuration file.
  5. Lastly, restart the original instance. 


Differentiate between stopping and terminating an EC2 instance. 

Stopping or terminating an EC2 Instance may sound the same. However, in AWS, both these are separate mechanisms.  

Stop Instance: The EC2 instance performs a normal shutdown and moves to a stopped state. The EBS volumes attached to the instance will still retain the data. 

Terminate Instance: The EC2 instance transfers to a stop state and next the EBS volumes attached to it are deleted permanently.  


What is AMI and what are the common AMI designs? 

AMI or Amazon Machine Images is a master image that creates a virtual machine inside the EC2 instance as a virtual image. A single AMI image can create several Amazon EC2 instances. 


The common AMI designs are: 

  • Fully Baked AMI: Can deploy a single instance or multiple identical EC2 instances. 
  • JeOS AMI or Just enough operating system: These offer greater flexibility during deployment. Also, they utilize minimal server images thereby providing the highest levels of portability. 
  • Hybrid AMI: It lies somewhere in between fully baked and JeOS AMI. Amalgamates the flexibility of making changes after deployment while providing the speed of preconfigured and preinstalled infrastructure components. 


What are some Amazon EC2 security best practices? 

  • Use identity federation, IAM roles, and IAM users for managing access to AWS resources and APIs.  
  • Create credential management policies.  
  • Implement stringent rules for the security group that allows minimal permissions to the users.   
  • Ensure routine updates, patch creation, and securing the OS and applications on your instance. 

What are the different features of AWS Elastic Beanstalk and AWS CloudFormation? 

Below are the features of AWS Elastic Beanstalk:  

  • It helps in quickly deploying and managing applications on the AWS cloud 
  • In Elastic Beanstalk, when an application gets uploaded, it automatically handles the deployment details.  
  • Also, there is no additional charge for using Elastic Beanstalk; you need to pay only for AWS service. It belongs to Platform as a service. 

Features of AWS CloudFormation: 

  • AWS CloudFormation has several ready-to-run sample templates like WordPress for blogs, Tracks for project tracking, Drupal and Joomla for content management, etc. 
  • Additionally, you can use the AWS CloudFormation templates repeatedly to create a new stack or similar copies for an existing stack.  
  • Also, CloudFormation Templates are simple JSON format text files that may be stored in private or public locations. 


How does Amazon Elastic Beanstalk apply updates? 

Elastic Beanstalk enables the user to perform major version updates through the Elastic Beanstalk management console, Command Line Interface, or application programming interface.  

For any updates to the managed platforms, AWS Elastic Beanstalk uses an immutable deployment mechanism. It makes certain that before making changes to the existing environment, there is a parallel fleet of Amazon EC2 instances that has the latest version installed. These instances are then swapped with the existing instances, which are eventually terminated.  

Moreover, if the Elastic Beanstalk health system finds any anomaly during the update, it redirects the traffic to the current instances. This ensures that any issues during the update do not affect the end-user applications. 


What is AWS Lambda? How does it work? 

AWS Lambda is a serverless computing service, where the developers have to focus only on code development.  

AWS provides the backend resources and also manages the servers, keeping the developers focused on optimizing the code. The code runs as a Lambda function and is only triggered by the Event Source. Here is a diagram showing how Lambda works: 

Image from


What are some of the AWS Lambda best practices? 

Lambda follows the best practices listed below: 

  • Principle of least privilege: Apply only minimum privileges required for an IAM role that is attached to the Lambda function.  
  • Monitor and log functions: Ensure that lambda functions have access to Lambda logs to easily debug or troubleshoot in case of any failures.  
  • Exclusive IAM role: Avoid sharing IAM roles between Lambda functions to keep the permissions exclusive to each function. 
  • Temporary AWS credentials: Avoid usage of any long-lived AWS credentials within the Lambda function or configuration. The SDK automatically manages the retrieval and rotation of temporary credentials generated for the role. 
  • Manage secrets in secure storage: Parameter store/secrets manager can be used to store secrets (sensitive database credentials, configuration) and avoid using them in the actual code.  


How long can an AWS Lambda function execute? 

Amazon Lambda function can be set to run up to 15 minutes. The run time is configurable and can be set between 1 second to a maximum of 15 minutes. 


What is the definition of auto-scaling in AWS Lambda? 

Auto Scaling in AWS refers to the process of automatic monitoring of applications and adjusting the capacity of resources as per requirements. It ensures to maintain a steady performance at a minimal cost.  


General AWS Interview Questions 

Explain the importance of Buffer in AWS? 

Various components in AWS receive and process requests in an unsynchronized manner. Hence, AWS buffer helps in synchronizing these components and request processing. Buffer also manages the balance of these components to maintain the speed of service. Moreover, the buffer provides efficiency over traffic as well. 


Can you scale an Amazon Web Service instance vertically? If yes, then how?

Yes, it is possible to scale an AWS instance vertically. Although it is challenging, you can still achieve this by adding more CPU or RAM, and thus eventually increasing the power. To vertically scale the instance, you need to stop it, change its size, and restart the instance.  

Image from


Can you add an already present instance to a fresh Auto Scaling group? 

Yes, you can attach an existing instance to a new Auto Scaling group. The configuration of the new group gets its settings from the instance that is attached. These settings can also be edited later as per requirement.


Which factors do you need to consider while planning a migration to Amazon Web Services?

Here are a few factors to consider when deciding to migrate to AWS: 

  • Operational Costs and Return of Investments  
  • Business Impact Analysis 
  • Operational resilience 
  • Business agility 
  • Service Level Agreement 
  • Security 
  • Future Migration Needs 

Companies today are rapidly moving their data and applications to the cloud. And AWS is truly being the top player in the cloud-computing domain. Therefore, it is the right time to build a career in AWS. Though AWS is a vast domain, we have touched upon all the trending topics related to it. Also, if along with questions you want to do some practice, try this hands-on Amazon Web Service tutorial. Certainly, it wouldn't be long when you become a part of this 370 billion dollar industry.