Skip to main content

Command Palette

Search for a command to run...

Day 35: Interview questions on AWS

Updated
9 min readView as Markdown
Day 35: Interview questions on AWS
P

Hi, I am an AWS-certified cloud engineer and I write about my progress and learnings of DevOps.

Hello everyone!

In the last article, we have seen Elastic container services. Today we are going to see basic interview questions on AWS and sharpen our theoretical knowledge.

INTERVIEW QUESTIONS:

  1. Name 5 AWS services you have used and what are the use cases?
  • Amazon EC2 (Elastic Compute Cloud): EC2 provides scalable computing capacity in the cloud. It’s commonly used to host web applications, run batch-processing jobs, and handle various compute-intensive tasks.

  • Amazon S3 (Simple Storage Service): S3 offers scalable object storage for various types of data, such as backups, static website hosting, data archiving, and content distribution.

  • Amazon RDS (Relational Database Service): RDS makes it easy to set up, operate, and scale relational databases. It’s used for hosting databases like MySQL, PostgreSQL, Oracle, and SQL Server.

  • Amazon DynamoDB: DynamoDB is a managed NoSQL database service, suitable for applications that require low-latency, seamless scalability, and high availability, such as gaming and mobile applications.

  • Amazon SQS (Simple Queue Service): SQS provides a scalable, fully managed message queuing service for decoupling and scaling microservices, distributed systems, and serverless applications.

    1. What are the tools used to send logs to the cloud environment?
  • Nowadays, even the easiest projects use multiple tools, and with growing complexity, the amount of generated logs grows proportionally. To stay on top of your logs from applications, servers, databases, networks, you will need help. Also, a good log management tool will help you make sure that you meet any compliance requirements or agreements, which will help you protect your good name but could also save you a lot of money.

  • Better Stack is a complete log management solution from Better Stack, allowing you to collect, transport, analyze, monitor, store, and archive logs from all over your cloud architecture.

  • Sematext Cloud offers a cloud logging solution within its monitoring platform. Sematext Cloud allows you to monitor Private, Public, and Hybrid Cloud services and easily integrates with most Cloud and Container Platforms.

  • Datadog Log Management offers Logging without Limits - a solution for collection, processing, storage, exploration, and monitoring of your logs.

  • Papertrail is yet another cloud-based log management tool. You can use it to Aggregate logs, tail, and search using a browser, CLI, or API, create alerts, or integrate it with other SolarWinds’ products such as AppOptics.

  • Amazon Cloudwatch Logs is a solution that allows you to monitor, store, and access log files from Amazon Elastic Compute Cloud, AWS CloudTrail, Route 53, and more sources.

  • Google Cloud Logging is a fully managed log management solution enabling you to store, analyze and create alerts. Its Logs Explorer enables you to view logs from Google Cloud Services in the Console.

    1. What are IAM Roles? How do you create /manage them?

IAM Roles are a way to delegate access to AWS resources securely. They are similar to users, in that they are both AWS identities with permissions policies that determine what the identity can and cannot do in AWS. However, instead of being uniquely associated with one person, a role is intended to be assumed by anyone who needs it.

  • Creating Roles: Go to the IAM console, navigate to “Roles,” and click “Create Role.” Choose the trusted entity type (e.g., AWS service or another AWS account), select permissions policies, and define role details.

  • Managing Roles: You can update trust policies and attach/detach permissions policies to roles. Roles can be assumed by entities like EC2 instances or Lambda functions, allowing them to access other AWS resources based on the permissions associated with the role.

    1. How to upgrade or downgrade a system with zero downtime?

Achieving zero downtime typically involves deploying the new version in parallel with the existing one and then seamlessly switching traffic to the upgraded version. Techniques like blue-green deployment, canary deployment, and rolling deployments can be used to achieve this. Load balancers, proper health checks, and monitoring play a crucial role in these strategies.

  1. What is infrastructure as code and how do you use it?

Infrastructure as code (IaC) uses DevOps methodology and versioning with a descriptive model to define and deploy infrastructure, such as networks, virtual machines, load balancers, and connection topologies. Just as the same source code always generates the same binary, an IaC model generates the same environment every time it deploys.

Tools for IaC in AWS include:

  • AWS CloudFormation: A service that enables you to define and provision AWS infrastructure using JSON or YAML templates.

  • Terraform: An open-source tool for building, changing, and versioning infrastructure in a safe and efficient manner.

    1. What is a load balancer? Give scenarios of each kind of balancer based on your experience.

Load balancing is the method of distributing network traffic equally across a pool of resources that support an application. Modern applications must process millions of users simultaneously and return the correct text, videos, images, and other data to each user in a fast and reliable manner. To handle such high volumes of traffic, most applications have many resource servers with duplicate data between them.

Application Load Balancer (ALB): They are ideal for routing HTTP/HTTPS traffic and provide advanced features like path-based routing and host-based routing. ALBs are used for distributing traffic to different application services or microservices.

Network Load Balancer (NLB): They are used for TCP/UDP traffic and are suitable for scenarios requiring ultra-high performance and low latency. NLBs are often used for handling gaming, streaming, and other latency-sensitive workloads.

  1. What is CloudFormation and why is it used for?

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and CloudFormation takes care of provisioning and configuring those resources for you.

  1. Difference between AWS CloudFormation and AWS Elastic Beanstalk?

AWS CloudFormation: It’s a service for infrastructure automation. It helps in provisioning and managing a wide range of AWS resources and services. You define the infrastructure using templates, which can include networking, storage, security settings, and more.

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.

  1. What are the kinds of security attacks that can occur on the cloud? And how can we minimize them?

Common cloud security threats include

  • Crytopjacking

  • Data breaches

  • Denial of service

  • Insider threats

  • Hijacking accounts

Here is how we can prevent attack on AWS services.

  • Implement strong access controls using IAM.

  • Encrypt data at rest and in transit.

  • Regularly update and patch systems.

  • Use security groups and network ACLs to control traffic.

  • Implement monitoring, logging, and intrusion detection.

  • Use firewalls and WAFs for filtering malicious traffic.

  • Implement proper authentication and authorization mechanisms.

    1. Can we recover the EC2 instance when we have lost the key?

If you’ve lost the SSH key to access your EC2 instance, you won’t be able to directly regain access using that key. However, you have a few options:

  • Use an Existing Key: If you have other users with access to the instance using different keys, they might still be able to access it.

  • Launch Replacement Instance: Create a new EC2 instance and migrate your data. This is often the recommended approach to ensure security.

  • Replace Key Pair (Linux): If you have the ability to stop the instance and detach its root volume, you can attach it to another instance, modify the SSH keys, and then reattach it.

11. What is a gateway?

In a networking context, a gateway is a device or software that acts as an entry or exit point for traffic between different networks. It serves as a bridge between different network protocols or technologies, allowing data to flow between them. Gateways can also provide additional functionalities like network address translation (NAT), firewalling, and routing. Common examples include routers that connect local networks to the internet and API gateways that mediate communication between applications.

12. What is the difference between the Amazon Rds, Dynamodb, and Redshift?

  • Amazon RDS (Relational Database Service): RDS is a managed relational database service. It supports various database engines like MySQL, PostgreSQL, Oracle, and SQL Server. It’s suitable for applications that require traditional relational databases, providing features like automated backups, automatic software patching, and scalability.

  • Amazon DynamoDB: DynamoDB is a managed NoSQL database service. It offers fast and predictable performance, seamless scalability, and built-in security features. It’s suitable for applications that require low-latency access to large amounts of data, like gaming or real-time applications.

  • Amazon Redshift: Redshift is a managed data warehousing service. It’s designed for analyzing large datasets using SQL queries. It’s optimized for analytics workloads, columnar storage, and parallel processing. Redshift is suitable for business intelligence, data warehousing, and reporting.

13. Do you prefer to host a website on S3? What’s the reason if your answer is either yes or no?

Whether to host a website on Amazon S3 depends on the specific requirements and characteristics of the website. Here are reasons for both yes and no:

Yes, Host on S3:

  • Static Websites: If your website is primarily composed of static content (HTML, CSS, JavaScript), S3 can efficiently serve these files.

  • Scalability: S3 can handle high traffic loads without manual scaling efforts.

  • Cost-Effective: S3 offers cost-effective storage and data transfer pricing.

No, Don’t Host on S3:

  • Dynamic Content: If your website relies heavily on server-side processing, databases, or user-generated content, you might need a more dynamic hosting solution.

  • Server-Side Logic: S3 does not support server-side scripting, so complex server-side logic cannot be directly implemented.

14. What is the relation between the Availability Zone and Region?

AWS regions are separate geographical areas, like the US-West 1 (North California) and Asia South (Mumbai). On the other hand, availability zones are the areas that are present inside the regions. These are generally isolated zones that can replicate themselves whenever required.

15. What is Autoscaling?

Auto-scaling is a function that allows you to provision and launch new instances whenever there is a demand. It allows you to automatically increase or decrease resource capacity in relation to the demand.

16. Is there any other alternative tool to log into the cloud environment other than console?

The that can help you log into the AWS resources are:

  • Putty

  • AWS CLI for Linux

  • AWS CLI for Windows

  • AWS CLI for Windows CMD

  • AWS SDK

  • Eclipse

17. Why do we make subnets?

Creating subnets means dividing a large network into smaller ones. These subnets can be created for several reasons. For example, creating and using subnets can help reduce congestion by making sure that the traffic destined for a subnet stays in that subnet. This helps in efficiently routing the to the network, which reduces the network’s load.

18. What is the maximum number of S3 buckets you can create?

The maximum number of S3 buckets that can be created is 100.

19. How many total VPCs per account/region and subnets per VPC can you have?

We can have a total of 5 VPCs for every account/region and 200 subnets for every VPC that you have.

20. What does an AMI include?

AMI stands for Amazon Machine Images. It includes the following:

  • Single or multiple Amazon Elastic Block Store (Amazon EBS) snapshots. Basically, templates for the root volume of the instance.

  • Launch permissions that let AWS accounts use AMI to launch instances.

  • A block device mapping to specify what volumes to be attached to the instance during its launch.


More from this blog

C

Cloud Cognizance

49 posts

Swimmer | Technical Writer | Cloud Engineer