Day49: INTERVIEW QUESTIONS ON AWS

Day49: INTERVIEW QUESTIONS ON AWS

1) Name 5 aws services you have used and what's the use cases?

Here are five AWS services I have used and their use cases:

Amazon S3(Simple Storage Service): It is an object storage service used to store and retrieve any amount of data from anywhere on the web. It is an object storage service that offers industry-leading scalability, data availability, security, and performance. Used for hosting static websites, backup and archiving, and data lakes.

Amazon EC2(Elastic Compute Cloud): It provides scalable compute capacity in the cloud. I have used it to launch and manage virtual machines (EC2 instances) for various purposes such as web hosting and data processing. Used for web and mobile applications, big data processing, and hosting databases.

Amazon IAM(Identity And Access Management): It is a web service that helps you securely control access to AWS resources. With IAM, you can centrally manage permissions that control which AWS resources users can access. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources.

Amazon RDS(Relational Database Service): It is a managed database service that makes it easy to set up, operate, and scale a relational database in the cloud. I have used it to create and manage MySQL databases for web applications.

Amazon CloudWatch: It is a monitoring and observability service for AWS resources and applications. I have used it to collect and track metrics, collect and monitor log files, set alarms, and automatically react to changes in AWS resources. CloudWatch can be used to monitor services like EC2, RDS, S3, and Lambda, as well as custom metrics generated by your applications.

2)What are the tools used to send logs to the cloud environment?

Several tools can be used to send logs to the cloud environment, including Amazon CloudWatch Logs, AWS CloudTrail, and AWS Elastic Beanstalk. Other popular logging and monitoring tools include Splunk, Logstash, and Fluentd.

3)What are IAM Roles? How do you create /manage them?

IAM (Identity and Access Management) Roles are AWS entities that define a set of permissions for making AWS service requests. A role is a secure way to grant permissions to entities that you trust, such as AWS services, IAM users, or resources outside of AWS. IAM Roles are created and managed in the AWS Management Console or via the AWS CLI. steps for creating and managing IAM Roles:

  1. Sign in to the AWS Management Console and open the IAM console.

  2. Navigate to the Roles page, and click on the Create role button.

  3. Select the AWS service that will use this role, such as EC2 or Lambda.

  4. Choose the use case for the role, such as granting permissions to access specific AWS resources or allowing cross-account access.

  5. Define the permissions for the role by attaching one or more policies to the role.

  6. Define the trust policy, which specifies who can assume the role and under what conditions.

Review and confirm the role details, and then click on the Create role button. To manage an existing IAM Role, you can navigate to the Roles page in the IAM console and select the role that you want to manage. You can then perform various actions on the role, such as editing the role policy, adding or removing permissions, or deleting the role. You can also use the AWS CLI or SDKs to manage IAM Roles programmatically.

4)How to upgrade or downgrade a system with zero downtime?

To upgrade or downgrade a system with zero downtime, you can use techniques such as blue-green deployment, rolling deployment, or canary deployment. These techniques involve creating a duplicate environment, deploying the updated version to the duplicate environment, and gradually shifting traffic from the old environment to the new one.

5)What is infrastructure as code and how do you use it?

Infrastructure as Code is a practice of defining and managing IT infrastructure through code. It involves writing scripts or configuration files that describe the desired state of the infrastructure, which can then be automatically provisioned and managed by tools such as AWS CloudFormation or HashiCorp Terraform.

To use IAC, you need to define your infrastructure as code by creating scripts or configuration files that describe the desired state of your infrastructure. Once the code has been written, you can use a tool like CloudFormation or Terraform to provision and manage the infrastructure. The key benefits of IAC include version control, consistency, and automation. By using IAC, you can ensure that all environments are created and configured in the same way, reduce the risk of errors and inconsistencies, and speed up the deployment process by automating the provisioning and configuration of infrastructure

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

A load balancer is a device or software that distributes incoming network traffic across multiple servers to improve the performance, availability, and scalability of applications or services. It can help to distribute the workload among servers and prevent overloading.

Types of load balancers:

Classic Load Balancer (CLB): This load balancer routes traffic based on either the IP address of the client or the requested hostname. It supports both HTTP and HTTPS protocols, as well as TCP and SSL protocols.

some scenarios where a Classic load balancer may be used are:

1)Serving static websites or applications that do not rely on cookies

2) Distributing traffic across multiple web or application servers in a simple setup

3)Handling TCP or SSL traffic for non-HTTP/HTTPS applications

Application Load Balancer (ALB): This is a more advanced load balancer that operates at the application layer (Layer 7) and can route traffic based on the content of the request. ALB supports features such as path-based routing, host-based routing, and routing based on HTTP headers or query strings. It can also handle sticky sessions for applications that require session persistence, such as e-commerce websites or SaaS applications.

some scenarios where an application load balancer may be used are

1)Routing traffic to multiple microservices based on path or host

2) Handling traffic for complex web applications with multiple tiers

Network Load Balancer(NLB): It is a Layer 4 (transport layer) load balancer that can handle high volumes of traffic with low latency and high throughput. Also used to handle TCP and UDP traffic at the transport layer.

7)What is CloudFormation and why is it used for?

AWS CloudFormation is a service that allows you to model and provision AWS resources in a declarative way using templates. It is used to automate the deployment and management of infrastructure as code in AWS, making it easier to create, update, and delete stacks of resources with minimal effort. By using CloudFormation, you can create and configure resources in a consistent and repeatable way, reducing the time and effort required to manage your infrastructure.

8)Difference between AWS CloudFormation and AWS Elastic Beanstalk?

AWS CloudFormation is a service that automates the deployment and management of infrastructure resources, CloudFormation is focused on infrastructure management, and provides more flexibility and control over the resources being deployed. It allows for custom scripts and the more granular resource configuration.

AWS Elastic Beanstalk is a platform that simplifies the deployment and management of applications by providing a preconfigured platform. It is focused on application management and provides a preconfigured platform that simplifies the deployment and management of applications. It includes a variety of prebuilt components, such as load balancers and databases, which can be quickly and easily configured.

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

Several kinds of security attacks can occur on the cloud, including

1)Distributed Denial of Service (DDoS) attack

2)Malware and viruses

3)Data breaches and theft

4)Cross-site scripting (XSS) attacks

5)SQL injection attacks

6)Phishing attacks

To minimize these security attacks, here are some best practices:

1)Use strong authentication and authorization mechanisms, such as multi-factor authentication and role-based access control.

2)Implement encryption for data at rest and in transit.

3)Implement network security controls such as firewalls and intrusion detection and prevention systems.

4)Implement regular security audits and vulnerability assessments.

5)Maintain compliance with industry standards and regulations.

6)Implement security monitoring and logging to detect and respond to security incidents.

7)Use a trusted cloud service provider with a strong track record of security and compliance.

10)Can we recover the EC2 instance when we have lost the key?

We can recover an EC2 instance when we have lost the key pair by creating a new key pair, stopping the instance, detaching the root volume, launching a new instance with the new key pair, attaching the root volume to the new instance, starting the new instance, and updating security groups and IP addresses as needed.

There is another way to recover an ec2 instance, if we have lost the key pair, we can create an AMI of the existing instance, and then launch a new instance. We can then select a new key pair by following the instance launch wizard.

11)What is a gateway?

A gateway is a network component that serves as a bridge or a transition point between different networks. It is used to facilitate communication and data transfer between networks that may have different communication protocols and addressing schemes. Gateways can be used to connect different cloud environments together.

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

Amazon RDS, DynamoDB, and Redshift are three different database services offered by Amazon Web Services (AWS) with different use cases and functionalities.

Amazon RDS (Relational Database Service): is a fully managed relational database service that makes it easy to set up, operate, and scale a relational database in the cloud. It supports popular database engines like MySQL, PostgreSQL, Oracle, and SQL Server. With RDS, you don't have to worry about managing the underlying infrastructure, including patching, backups, and replication. Instead, you can focus on building and optimizing your applications.

Amazon DynamoDB: on the other hand, is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. It is designed to handle large amounts of unstructured data, such as documents, images, and social media content. DynamoDB is a serverless database, which means that you don't have to manage any servers or infrastructure.

Amazon Redshift: is a fully managed data warehouse service that makes it easy to analyze large amounts of data using SQL and business intelligence tools. It is designed for online analytical processing (OLAP) and supports big data analytics. Redshift is optimized for querying and analyzing large datasets and is based on a columnar storage format. It provides fast query performance and allows you to scale your cluster up or down depending on your needs.

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

Hosting a website on S3 may be a good option for simple static websites that don't require server-side scripting or complex functionality. S3 charges based on the amount of storage used and data transferred, which can be significantly cheaper than using a traditional web hosting service.

However, for more advanced websites or applications, other web hosting services may be a better fit. S3 doesn't support server-side scripting, which means you can't use popular web technologies like PHP or ASP.NET. S3 also lacks some features that are typically included in web hosting services, such as domain name registration, email hosting, and database support.

Thank you for reading!! I hope you find this article helpful!!

Happy Learning!!

Sayali✨

Did you find this article valuable?

Support Sayali Jadhav by becoming a sponsor. Any amount is appreciated!