Skip to main content

Command Palette

Search for a command to run...

Day 49 : INTERVIEW QUESTIONS ON AWS

Updated
6 min read

Q: Name 5 aws services you have used and what's the use cases?
A: Amazon S3 (Simple Storage Service): S3 is a scalable object storage service used for storing and retrieving data. It is often used for backup and restore, static website hosting, data archiving, and content distribution.
Amazon EC2 (Elastic Compute Cloud): EC2 provides resizable compute capacity in the cloud. It allows users to launch virtual servers and deploy applications. EC2 is commonly used for web hosting, running enterprise applications, batch processing, and data analytics.
Amazon RDS (Relational Database Service): RDS is a managed database service that supports various database engines like MySQL, PostgreSQL, Oracle, and SQL Server. It simplifies database administration tasks and is used for hosting web applications, content management systems, and data warehousing.
Amazon SNS (Simple Notification Service): SNS is a fully managed messaging service that enables the sending of notifications to users or systems. It is often used for sending alerts, event-driven notifications, and mobile push notifications.
AWS Lambda: Lambda is a serverless compute service that lets you run code without provisioning or managing servers. It allows you to run functions in response to events and scales automatically. Lambda is commonly used for building serverless applications, event-driven data processing, and automating tasks.

Q: What are the tools used to send logs to the cloud environment?
A: Amazon CloudWatch Logs: Collects and stores log files from different sources, providing a unified view for log analysis and monitoring.
AWS CloudTrail: Logs API activity and events across your AWS infrastructure, capturing important information for auditing and security purposes.
AWS Elastic Beanstalk: Automatically collects logs generated by your application and stores them in a central location for easy access and analysis.
AWS Lambda: Can be used to process and send logs from various sources to cloud-based logging services like CloudWatch Logs.

Q:What are IAM Roles?
A:IAM Roles in AWS are a secure way to grant permissions to entities, such as AWS services or EC2 instances, without the need for access keys. They help in managing access to AWS resources securely.

Q: How to upgrade or downgrade a system with zero downtime?
A:

  1. Set up a load balancer or a reverse proxy in front of your system to distribute incoming traffic.

  2. Deploy the updated or downgraded version of your system on new instances or servers.

  3. Test the new version to ensure it functions correctly and meets your requirements.

  4. Gradually shift incoming traffic from the old version to the new version using the load balancer or reverse proxy.

  5. Monitor the traffic and system performance to ensure everything is functioning as expected.

  6. Once all traffic has been successfully routed to the new version and you have confirmed its stability, decommission the old version.

Q: What is infrastructure as code and how do you use it?
A: Infrastructure as Code (IaC) is using code to manage and provision infrastructure resources, ensuring automation, consistency, scalability, and version control.
Infrastructure as Code (IaC) involves writing configuration files or scripts that define the desired state of your infrastructure. These files are then executed using specialized tools or platforms, such as AWS CloudFormation or HashiCorp Terraform, to automatically create, modify, or destroy infrastructure resources. By treating infrastructure as code, you can easily reproduce and manage your infrastructure, track changes, collaborate effectively, and achieve infrastructure consistency across different environments.

Q: What is a load balancer? Give scenarios of each kind of balancer based on your experience.
A: A load balancer is a device or service that evenly distributes incoming network traffic to multiple servers. It helps prevent overload and ensures availability.
Based on my experience:

  • Classic Load Balancer (CLB): Distributes web traffic to multiple servers based on URL requests.

  • Application Load Balancer (ALB): Routes traffic based on URL paths, hostnames, or application content for microservices.

  • Network Load Balancer (NLB): Handles high volumes of traffic with low latency for applications like gaming or streaming.

Q: What is CloudFormation and why is it used for?
A: CloudFormation is a service provided by AWS that allows you to define and provision your AWS infrastructure as code. It simplifies the process of managing and deploying resources by automating the creation and configuration of AWS services. With CloudFormation, you can easily replicate and manage infrastructure in a consistent and repeatable manner, making it efficient and scalable.

Q: Difference between AWS CloudFormation and AWS Elastic Beanstalk?
A:AWS CloudFormation is an infrastructure as code service that allows you to define and provision your AWS resources using templates. It provides a way to automate the creation, configuration, and management of your infrastructure.
AWS Elastic Beanstalk, on the other hand, is a fully managed platform as a service (PaaS) that simplifies the deployment and management of applications. It abstracts the underlying infrastructure and handles tasks such as capacity provisioning, load balancing, and automatic scaling, allowing you to focus on application development.

Q: What are the kinds of security attacks that can occur on the cloud? And how can we minimize them?
A: Cloud security attacks can include unauthorized access, data breaches, and DDoS attacks. To minimize them: use strong access controls, encrypt data, monitor for suspicious activity, implement firewalls, keep systems updated, and have backups and disaster recovery plans in place.

Q:Can we recover the EC2 instance when we have lost the key?
A: Yes, it is possible to recover an EC2 instance when the key pair is lost. The recovery process involves creating a new key pair, stopping the EC2 instance, detaching the root volume, attaching the volume to a new temporary instance, modifying the SSH configuration, and then reattaching the volume to the original instance. This allows you to regain access to the instance without losing any data. However, it's important to note that this process requires careful execution and should be done with caution.

Q: What is a gateway?
A: A gateway is a network device or service that acts as an entry point between two different networks, allowing communication and data transfer between them. It serves as a bridge or interface, enabling connectivity and facilitating the flow of information between different systems, networks, or protocols. Gateways can perform various functions, such as routing data, translating protocols, providing security, and facilitating interoperability between disparate systems or networks.

Q: What is the difference between the Amazon Rds, Dynamodb, and Redshift?
A: Amazon RDS (Relational Database Service) is a managed database service that provides a relational database environment, supporting engines like MySQL, PostgreSQL, Oracle, and SQL Server. It is ideal for applications that require traditional relational database functionality.
DynamoDB, on the other hand, is a fully managed NoSQL database service provided by AWS. It offers fast and flexible storage for applications that require low-latency, scalable, and highly available data storage. DynamoDB is a key-value and document database, allowing for easy scalability and automatic replication across multiple data centers.
Redshift is a fully managed data warehousing service provided by AWS. It is optimized for analyzing large datasets and running complex queries efficiently. Redshift is designed for online analytical processing (OLAP) workloads, making it suitable for data warehousing and business intelligence applications.

Q: Do you prefer to host a website on S3? What's the reason if your answer is either yes or no?
A: Yes.
Simple setup: S3 provides a straightforward way to host static websites without the need for complex server configurations.
Cost-effective: S3 offers cost-effective storage and data transfer pricing, making it suitable for low-traffic or static websites with predictable usage.
Cost-effective: S3 offers cost-effective storage and data transfer pricing, making it suitable for low-traffic or static websites with predictable usage.

More from this blog

Ajay Patel

116 posts