AWS Interview Questions and Answers: Storage and 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:
- How does a user gain access to a particular bucket?
- What is AWS S3 Bucket? What can be its maximum size?
- What are the key features of AWS S3?
- Which AWS service can aggregate data across different AWS accounts?
- How to upload a larger file(greater than 100MB) in Amazon S3?
- What is the default storage in S3 and what are the different storage types available?
- How do we send a request to S3?
- Differentiate between AWS S3 and Amazon Elastic Block Store(EBS).
- Difference between EBS and Instance Store
- How to automate EC2 backup using EBS?
- What are the benefits of EBS?
- What is the way to auto-delete old snapshots?
- Which is better between Amazon S3 and Amazon S3 Glacier?
- What is an archive and why is it used?
- What are the key benefits of cloud computing?
- What are the benefits of Amazon EC2?
- What is serverless architecture?
- Mention the different types of Amazon EC2 instances according to their cost
- If you lose the key, is there a way to recover your EC2 instance?
- Differentiate between stopping and terminating an EC2 instance.
- What is AMI and what are the common AMI designs?
- What are some Amazon EC2 security best practices?
- What are the different features of AWS Elastic Beanstalk and AWS CloudFormation?
- How does Amazon Elastic Beanstalk apply updates?
- What is AWS Lambda? How does it work?
- What are some of the AWS Lambda best practices?
- How long can an AWS Lambda function execute?
- What is the definition of auto-scaling in AWS Lambda?
- Explain the importance of Buffer in AWS?
- Can you scale an Amazon Web Service instance vertically? If yes, then how?
- Can you add an already present instance to a fresh Auto Scaling group?
- Which factors do you need to consider while planning a migration to Amazon Web Services?
AWS Storage Interview Questions: S3, EBS & Glacier
1. How does a user gain access to a particular bucket?
Below are the four steps to allow users to access a specific bucket.
- Categorize your instances
- Define rules for how authorized users can manage specific servers
- Lockdown your tags
- Change the user's IAM permissions
2. 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.
3. 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.
4. 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.
5. How to upload a larger file(greater than 100MB) in Amazon S3?
You can use two methods to upload large files in AWS Storage:
- Manual Upload: Split the file into chunks of permissible sizes and then manually upload to the AWS S3.
- 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.
6. 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.
7. 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.
8. Differentiate between AWS S3 and Amazon Elastic Block Store(EBS).
|Storage||Store a maximum of 5 TB of data. Individual objects can be up to 5 GB in size.||Store a maximum of 16TB of data. In a single AWS instance, you can store 40 EBS volumes.|
|Data Upload||Supports multipart upload for larger objects||EBS provisions Input/output operations per second (IOPS) for faster read and write.|
|Performance||S3 is highly scalable and can scale up to 300 requests per second.||EBS is manually scalable and offers the baseline performance of 3 ￼￼￼IOPS per GB.|
|Data Access||Access is available over the internet via the console, CLI, REST, or SOAP API.||Access is possible only over the EC2 instance|
9. Difference between EBS and Instance Store
|Storage Type||Permanent storage||Temporary storage|
|Data Retention||With EBS, you can restore data at any later point.||The instance store loses data when it is terminated or stopped.|
|Dependency on Host||EBS stores data even after the lifetime of the instance and is independent of the host machine.||The instance store is temporary and the data is attached to a physical host.|
10. How to automate EC2 backup using EBS?
- 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.
- List the snapshots available in each volume. Next, assign a retention period to each snapshot. Then create new snapshots for every single volume.
- If the snapshot has surpassed the retention period, then make sure you delete it.
11. 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.
12. What is the way to auto-delete old snapshots?
- Take snapshots of the EBS volumes on Amazon S3.
- Use AWS Ops Automator which enables automatic handling of all the snapshots. The automation enables the creation, deletion, and copying of Amazon EBS snapshots.
13. 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.
14. 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 Interview Questions: Amazon EC2, Elastic Beanstalk & Lambda
15. 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.
16. 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.
17. 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.
18. 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 Instances: Allow users to bid on the computing capacity of spare AWS EC2. It is more cost-effective than on-demand instances.
19. 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:
- Make sure that the EC2Config service is up and running.
- Detach the root volume for the instance.
- Attach the volume to a temporary instance.
- Modify the configuration file.
- Lastly, restart the original instance.
20. 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.
21. 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.
22. 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.
23. 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.
24. 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.
25. 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:
26. 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.
27. 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.
28. 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
29. 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.
30. 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.
31. 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.
32. 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
- 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.
Backend Technology Interview Questions
C Programming Language Interview Questions | PHP Interview Questions | .NET Core Interview Questions | NumPy Interview Questions | API Interview Questions | FastAPI Python Web Framework | Java Exception Handling Interview Questions | OOPs Interview Questions and Answers | Java Collections Interview Questions | System Design Interview Questions | Data Structure Concepts | Node.js Interview Questions | Django Interview Questions | React Interview Questions | Microservices Interview Questions | Key Backend Development Skills | Data Science Interview Questions | Python Interview Questions | Java Spring Framework Interview Questions | Spring Boot Interview Questions.
Frontend Technology Interview Questions
Database Interview Questions
Cloud Interview Questions
Quality Assurance Interview Questions
DevOps and Cyber Security Interview Questions
Design Product Interview Questions
Interview Preparation Tips
Strength and Weakness Interview Questions | I Accepted a Job Offer But Got Another Interview | Preparation Tips For the Virtual Technical Interview | 7 Tips to Improve Your GitHub Profile to Land a Job | Software Engineer Career Opportunities in Singapore | What can you expect during a whiteboard interview | How To Write A Resignation Letter | Recommendation Letter Templates and Tips.
Practice Skills | Best Tech Recruitment Agency in Singapore, India | Graduate Hiring | HackerTrail Litmus | Scout - Sourcing Top Tech Talent in ONE Minute | About HackerTrail | Careers | Job Openings.