# Day 49 - INTERVIEW QUESTIONS ON AWS

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1704214460156/e2afee66-0cb9-4752-9dbc-2371018bb79c.png align="center")

Certainly! Here are answers to the interview questions:

**Name 5 AWS services you have used and their use cases:**

1. * **Amazon S3 (Simple Storage Service):** Used for scalable object storage, hosting static websites, and data backup.
        
    * **Amazon EC2 (Elastic Compute Cloud):** Provides scalable compute capacity for running applications, hosting websites, and processing data.
        
    * **AWS Lambda:** Enables serverless computing, executing code in response to events without provisioning or managing servers.
        
    * **Amazon RDS (Relational Database Service):** Manages relational databases, facilitating easy setup, operation, and scaling.
        
    * **Amazon DynamoDB:** A NoSQL database for applications requiring single-digit millisecond latency at any scale.
        
2. **Tools used to send logs to the cloud environment:**
    
    * **Amazon CloudWatch Logs agent**
        
    * **AWS CLI (Command Line Interface)**
        
    * **AWS SDKs (Software Development Kits)**
        
    * **Third-party tools like Fluentd or Logstash**
        
3. **IAM Roles:**
    
    * IAM Roles are AWS Identity and Access Management entities that define a set of permissions for making AWS service requests.
        
    * Created and managed in the IAM console.
        
    * Used to grant permissions to AWS resources without the need for long-term credentials.
        
4. **Upgrading or downgrading a system with zero downtime:**
    
    * Employ strategies like Blue-Green deployments or canary releases.
        
    * Use AWS Elastic Load Balancers for distributing traffic between different versions.
        
    * Leverage AWS Auto Scaling to manage fleet size during the upgrade/downgrade.
        
5. **Infrastructure as Code (IaC):**
    
    * IaC is a practice of managing and provisioning infrastructure through machine-readable script or code.
        
    * AWS services like AWS CloudFormation or Terraform can be used for IaC.
        
    * Improves efficiency, consistency, and scalability of infrastructure deployment.
        
6. **Load Balancer:**
    
    * **Application Load Balancer (ALB):** Distributes traffic based on content of the request, suitable for microservices and container-based architectures.
        
    * **Network Load Balancer (NLB):** Operates at the transport layer, ideal for TCP/UDP traffic.
        
    * **Classic Load Balancer:** Distributes traffic across multiple EC2 instances.
        
7. **CloudFormation:**
    
    * AWS CloudFormation is an IaC service for provisioning and managing AWS resources.
        
    * Allows defining templates to describe the architecture and resources.
        
    * Enables automation of resource creation and updates.
        
8. **Difference between AWS CloudFormation and AWS Elastic Beanstalk:**
    
    * **CloudFormation:** Infrastructure provisioning and management. More granular control over resources.
        
    * **Elastic Beanstalk:** Platform as a Service (PaaS) offering. Simplifies deployment of applications, abstracting away infrastructure details.
        
9. **Security attacks on the cloud and mitigation:**
    
    * **DDoS attacks:** Use AWS Shield and CloudFront to mitigate.
        
    * **Data breaches:** Implement encryption, access controls, and monitor for unusual activities.
        
    * **Insecure APIs:** Regularly audit and secure APIs, use AWS WAF for web application firewall.
        
10. **Recover EC2 instance when key is lost:**
    
    * Create an AMI (Amazon Machine Image) of the existing instance.
        
    * Launch a new instance from the AMI with a new key pair.
        
11. **Gateway:**
    
    * In AWS, a gateway can refer to services like API Gateway or VPN Gateway.
        
    * **API Gateway:** Manages and secures APIs.
        
    * **VPN Gateway:** Connects on-premises networks to the AWS Cloud securely.
        
12. **Difference between Amazon RDS, DynamoDB, and Redshift:**
    
    * **Amazon RDS:** Managed relational database service.
        
    * **DynamoDB:** NoSQL database for high-performance applications.
        
    * **Redshift:** Managed data warehouse for analytics.
        
13. **Hosting a website on S3:**
    
    * **Yes:** Ideal for static websites with cost-effective storage and easy configuration.
        
    * **No:** If dynamic content or server-side processing is required, a combination of services like EC2 or Elastic Beanstalk may be more suitable.
