Mostly asked Interview question and answers

1. Name 5 AWS services you have used and their use cases.

- Amazon S3 (Simple Storage Service): Ideal for scalable object storage, facilitating the storage and retrieval of vast data amounts.

Amazon EC2 (Elastic Compute Cloud): Renowned for providing resizable cloud-based compute capacity, commonly utilized for application hosting.

Amazon RDS (Relational Database Service): A managed service catering to relational databases like MySQL, PostgreSQL, etc.

AWS Lambda: Offers serverless computing, enabling code execution without server provisioning or management.

Amazon DynamoDB: Serves as a NoSQL database, adept for applications necessitating high read and write throughput.

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

- Amazon CloudWatch Logs: Centralizes log collection and monitoring from diverse AWS services and custom sources.

AWS CloudTrail: Records API calls for your AWS account and delivers log files to an Amazon S3 bucket.

3. What are IAM Roles, and how do you create/manage them?

- IAM (Identity and Access Management) roles represent AWS identities with permission policies dictating their actions.

To create/manage IAM roles:

Access the IAM console.

Select "Roles" and initiate the "Create Role" process.

Specify the trusted entity type, attach policies, and define role specifics.

Manage roles by adjusting policies, trust relationships, and permissions.

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

- Utilize Amazon EC2 Auto Scaling to modify capacity while maintaining availability zone equilibrium.

Implement Blue-Green Deployments: Gradually transition traffic from an existing (Blue) environment to a new (Green) one launched alongside.

Leverage Elastic Load Balancers to facilitate seamless traffic distribution.

5. What is Infrastructure as Code (IaC), and how do you use it?

- IaC involves managing and provisioning infrastructure through machine-readable script files. In AWS, tools like AWS CloudFormation and Terraform define and deploy infrastructure, ensuring repeatability, consistency, and version control.

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

- A load balancer disperses incoming network traffic across multiple servers. Scenarios:

Application Load Balancer (ALB): Ideal for content-based traffic routing in microservices architectures.

Network Load Balancer (NLB): Tailored for handling TCP/UDP traffic with high performance and availability.

Classic Load Balancer: Suitable for balancing HTTP/HTTPS traffic in simpler applications.

7. What is CloudFormation, and why is it used for?

- AWS CloudFormation enables defining and provisioning AWS infrastructure as code, ensuring automated and consistent resource deployment, thereby enhancing reproducibility and management ease.

8. Difference between AWS CloudFormation and AWS Elastic Beanstalk?

- AWS CloudFormation: Manages and defines AWS infrastructure as code.

AWS Elastic Beanstalk: Automates application deployment and management, abstracting infrastructure intricacies.

9. What kinds of security attacks can occur on the cloud, and how can we minimize them?

- DDoS Attacks: Mitigated using AWS Shield, CloudFront, or third-party DDoS protection.

Data Breaches: Employ encryption, AWS Key Management Service (KMS), and adhere to robust security practices.

Unauthorized Access: Implement IAM policies, multi-factor authentication, and regularly audit permissions.

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

- Yes, by creating an Amazon Machine Image (AMI) of the EC2 instance and launching a new instance using the AMI with a new key pair.

11. What is a gateway?

- A gateway serves as a network node connecting different networks, acting as an entry/exit point for data. In AWS, examples include Amazon API Gateway and Amazon VPC Gateway.

12. What is the difference between Amazon RDS, DynamoDB, and Redshift?

- Amazon RDS: Managed relational database service.

DynamoDB: Fully managed NoSQL database service.

Redshift: Fully managed data warehouse catering to analytics.

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

- Yes, for static websites. Amazon S3 offers a cost-effective, scalable, and reliable solution for hosting static content. For dynamic content, combining S3 with AWS services like CloudFront and Lambda@Edge may be preferable.