Have a question?
Message sent Close

AWS Interview Questions

EC2 is Amazon’s IaaS (Infrastructure as a Service) product that allows users to rent virtual servers (instances) on-demand, run applications, and scale their infrastructure as needed.

EC2 instances come in various types such as General Purpose (e.g., t2, t3), Compute Optimized (e.g., c5), Memory Optimized (e.g., r5), Storage Optimized (e.g., i3), and GPU instances for compute-heavy tasks.

EC2 instance types define the specifications (CPU, memory, storage) of an instance. The right instance depends on your workload’s resource needs—compute, memory, or storage requirements.

An AMI is a pre-configured template for EC2 instances that includes the OS, application server, and applications. It’s used to launch instances with a specific configuration.

Stopping an EC2 instance keeps the data in the EBS volume intact and you can restart it later. Terminating an instance deletes the instance and any attached storage (unless otherwise configured).

C2 has several pricing models: On-Demand (pay by the hour or second), Reserved Instances (up to 75% discount for long-term usage), Spot Instances (up to 90% discount for unused EC2 capacity), and Dedicated Hosts (for compliance requirements).

You can secure EC2 instances by setting up security groups (firewall rules), using IAM roles for permissions, encrypting EBS volumes, using key pairs for SSH, and keeping software updated.

Security groups act as virtual firewalls for your instances to control inbound and outbound traffic based on IP, port, and protocol.

EC2 placement groups are used to control how instances are placed on underlying hardware. Types include Cluster (low-latency), Spread (high availability), and Partition (reduces failure risk by spreading across partitions).

Auto Scaling automatically adjusts the number of EC2 instances in response to traffic or load. It ensures that the number of instances dynamically increases or decreases based on demand.

Amazon S3 is a scalable object storage service used to store and retrieve any amount of data at any time from anywhere on the web. It’s highly durable, scalable, and secure.

Buckets are containers for storing objects (data) in S3. Each object within a bucket has a unique key (name) within the bucket, and you can configure permissions at the bucket level.

The maximum size of an individual object is 5TB. For uploads larger than 5GB, you must use multipart upload.

S3 offers several storage classes including Standard (frequently accessed data), Standard-IA (infrequent access), One Zone-IA (infrequent, less critical), Glacier (archiving), and Glacier Deep Archive (long-term storage).

S3 versioning maintains multiple versions of an object within a bucket, allowing you to restore, retrieve, or revert to previous versions of the object.

S3 Transfer Acceleration speeds up the upload of large files by using Amazon CloudFront’s globally distributed edge locations to improve transfer speeds across geographical distances.

Data in S3 can be secured by encrypting data at rest (using SSE-S3, SSE-KMS, SSE-C) and in transit (using SSL/TLS), bucket policies, access control lists (ACLs), IAM policies, and enabling MFA Delete.

S3 is object storage designed for scalability and distributed storage of data, whereas EBS is block storage used with EC2 for persistent storage of file systems, databases, and applications.

S3 provides 99.999999999% (11 9s) durability and 99.99% availability for Standard storage.

You can host a static website by uploading HTML, CSS, and other assets to an S3 bucket and enabling website hosting in the bucket properties. You need to set the appropriate permissions to make the content public.

Amazon RDS is a managed relational database service that supports various database engines like MySQL, PostgreSQL, MariaDB, Oracle, Microsoft SQL Server, and Amazon Aurora.

RDS provides automated backups, enabling you to recover your database to any point within a retention period (up to 35 days). Manual snapshots can also be taken.

Read replicas are copies of your database that allow read-heavy workloads to be offloaded from the primary database, improving read performance and redundancy.

Multi-AZ (Availability Zone) deployment automatically replicates your data across two different availability zones for failover support and enhanced availability.

You can scale an RDS instance vertically by modifying the instance type (CPU, memory), or horizontally by using read replicas for read scaling.

Amazon Aurora is a fully managed relational database service compatible with MySQL and PostgreSQL that provides high performance and availability, often up to five times faster than standard MySQL.

RDS Performance Insights provides real-time performance monitoring and troubleshooting for RDS databases. It helps you analyze database load and optimize queries.

Data can be encrypted using AWS KMS, both at rest (on disk) and in transit (SSL/TLS). Encrypted RDS instances encrypt data on the underlying storage and all backups, snapshots, and read replicas.

Security in RDS can be achieved by using VPC (Virtual Private Cloud) to isolate your database, enabling encryption, using IAM roles, applying security groups, and restricting access with database-level authentication.

RDS is a relational database service that supports SQL databases, while DynamoDB is a fully managed NoSQL database service optimized for key-value and document data models, offering horizontal scaling without SQL constraints.

EC2 instances are categorized into various types based on their use cases:

  • General Purpose (e.g., t3, m6g): Balance of compute, memory, and networking.
  • Compute Optimized (e.g., c5, c6g): Optimized for compute-bound applications.
  • Memory Optimized (e.g., r5, x1e): For memory-intensive workloads.
  • Storage Optimized (e.g., i3, d2): High disk throughput.
  • Accelerated Computing (e.g., p3, f1): For GPU and FPGA workloads.

Instance types define the hardware of the host machine used for your instance. Each instance type offers different compute, memory, and storage capabilities. Instance sizes (like t3.micro, t3.large) within each type provide flexibility based on the required capacity.

    • An Elastic IP is a static IPv4 address designed for dynamic cloud computing. It can be associated with any instance and allows for easier management of your EC2 instances as IP addresses remain constant even if instances are stopped or restarted.
    • Stopping an EC2 instance shuts it down, but the instance is still available, and you can restart it later (you will be billed for storage). Terminating an instance deletes it, and you can no longer access it.
    • You can scale EC2 instances either vertically (increasing the size of the instance) or horizontally (adding more instances). For horizontal scaling, Auto Scaling groups can automatically adjust the number of instances based on the demand.

Reserved Instances allow you to reserve capacity in advance and offer significant savings compared to On-Demand instances. You can choose between Standard and Convertible Reserved Instances.

EC2 Spot Instances allow you to bid on spare AWS EC2 computing capacity at discounted rates compared to On-Demand pricing. However, AWS can terminate the instance when your bid falls below the current Spot price.

A security group acts as a virtual firewall for your EC2 instances, controlling the incoming and outgoing traffic. You can define rules based on IP ranges and protocols (e.g., TCP, UDP).

    • S3 buckets are containers in Amazon S3 where objects (files) are stored. Each bucket has a globally unique name and can contain any number of objects.

S3 Standard Storage is for frequently accessed data, offering low-latency access. S3 Glacier and S3 Glacier Deep Archive are used for long-term archival with retrieval times of minutes to hours.

S3 versioning allows you to store multiple versions of an object in the same bucket. It helps protect against accidental overwrites or deletions by keeping older versions of files.

    • S3 lifecycle policies allow you to automate the movement of objects between different storage classes (e.g., from Standard to Glacier) based on pre-defined rules or conditions, such as age or last access date.
    • S3 offers multiple layers of security, including bucket policies, IAM policies, encryption (server-side and client-side encryption), and SSL/TLS for data in transit. S3 also supports access control lists (ACLs).
    • S3 access logs are logs that record details about requests made to your S3 bucket. These logs can be used for monitoring and auditing access to your data.
    • Pre-signed URLs grant temporary, time-limited access to a specific S3 object without needing to make the object public. These URLs can be shared with others to provide controlled access.

CRR automatically replicates data from one S3 bucket to another bucket in a different AWS region for improved durability, compliance, or disaster recovery purposes.

    • The benefits include automated backups, easy scalability, high availability with Multi-AZ, automated maintenance, and improved security with encryption and VPC integration
    • Multi-AZ provides high availability by automatically replicating your database to another Availability Zone, while Read Replicas provide scalability by creating read-only copies of your database for load balancing

Automated backups are daily backups of your database that AWS creates automatically. They allow you to restore your database to any point in time within the retention period (up to 35 days).

To scale an RDS instance vertically, you can change the instance type to one with more CPU, memory, or I/O capacity, depending on your application’s needs.

Performance Insights provides performance monitoring and tuning tools for RDS instances, enabling you to identify and resolve performance bottlenecks in your database.

RDS supports encryption at rest and in transit. For at-rest encryption, you can enable encryption for your database using AWS KMS (Key Management Service) to encrypt the underlying storage.

Amazon Aurora is a fully managed, MySQL- and PostgreSQL-compatible relational database that offers up to five times the performance of standard MySQL and three times that of PostgreSQL, with high availability and scalability.

    • Parameter groups in RDS are configuration settings that control the behavior of the database engine. You can modify these parameters to tune your database performance

RDS event notifications allow you to receive alerts when specific database events occur, such as failover, backup completion, or maintenance actions. You can configure notifications via Amazon SNS (Simple Notification Service).

 

A VPC is a virtual network dedicated to your AWS account, providing isolated networking for your resources. It allows you to configure your own IP address range, subnets, route tables, and gateways.

Key components include subnets, route tables, internet gateway, NAT gateway, security groups, network ACLs, and VPC peering.

Subnets are subdivisions within a VPC that allow you to group resources based on accessibility needs, either public or private.

A public subnet has a route to the internet via an Internet Gateway, while a private subnet does not, allowing it to be used for internal-only resources.

An Internet Gateway allows communication between resources in the VPC and the internet. It is attached to the VPC and allows public IP addresses in public subnets to access the internet.

A NAT Gateway allows instances in a private subnet to connect to the internet without exposing them to inbound traffic. It’s useful for updating software on private instances.

Security Groups act as virtual firewalls at the instance level, controlling inbound and outbound traffic to resources based on defined rules.

Network ACLs operate at the subnet level and provide an additional layer of security. Unlike Security Groups, they are stateless, meaning outbound responses need to be explicitly allowed.

VPC Peering allows two VPCs to communicate with each other directly over private IP addresses, providing a way to connect VPCs within or across regions.

A route table directs network traffic within a VPC, specifying the paths for traffic to reach different destinations, like other subnets or external networks.

By default, you can have 5 VPCs per AWS region, though this limit can be increased upon request.

A VPC Endpoint enables private connections between your VPC and AWS services, keeping the traffic within the AWS network.

There are two types: Interface Endpoints (for services that use private IP addresses) and Gateway Endpoints (for S3 and DynamoDB access).

An Elastic IP is a static, public IP that can be associated with an instance or NAT Gateway, useful for applications that need consistent IPs.

AWS provides a DHCP option set for assigning DNS and other options to instances in a VPC automatically.

A Transit Gateway allows you to connect multiple VPCs and on-premises networks through a single gateway, simplifying large network architectures.

A Bastion Host is a secure instance used to access instances in private subnets, typically configured with SSH or RDP.

VPCs in different regions can be connected through VPC Peering or by using a Transit Gateway.

PrivateLink allows secure access to services hosted in VPCs without exposing the services to the public internet.

VPC Flow Logs capture IP traffic information for network interfaces, helping with security monitoring and troubleshooting.

Flow Logs provide visibility into IP traffic, allowing you to monitor suspicious activities or unauthorized access attempts.Flow Logs provide visibility into IP traffic, allowing you to monitor suspicious activities or unauthorized access attempts.

Default VPC includes a default subnet in each AZ, a route table, an internet gateway, and a default security group.

AWS Direct Connect establishes a dedicated network connection from your on-premises to your AWS VPC, bypassing the public internet.

An ENI is a virtual network interface that can be attached to an instance, providing multiple IPs or network interfaces.

CIDR (Classless Inter-Domain Routing) defines the IP address range for a VPC. For example, a VPC might have a CIDR block like 10.0.0.0/16.

A VPN Gateway connects your on-premises network to your AWS VPC through a secure, encrypted VPN connection.

A VPN connection uses IPsec to establish an encrypted tunnel from your network to the VPC, securing data transmitted between locations.

You cannot modify an existing CIDR block, but you can add secondary CIDR blocks to extend the IP range.

The limit is 200 subnets per VPC by default, which can be increased if necessary.

Check security groups, network ACLs, route tables, VPC Flow Logs, and ensure the correct IP addresses are configured.

Route Propagation allows VPN or Direct Connect routes to be automatically propagated to the VPC’s route table, simplifying configuration.

Cross-account VPC peering allows VPCs in different AWS accounts to communicate as long as there’s mutual peering setup and route configurations.

Peering does not support transitive peering, so traffic cannot route from one peered VPC to another indirectly.

An egress-only Internet Gateway provides outbound-only access for IPv6 traffic, blocking incoming traffic for security.

You can add secondary IP addresses by attaching an Elastic Network Interface (ENI) with multiple IP addresses.

Transit Gateway allows transitive routing between multiple VPCs and on-premises networks, whereas VPC Peering is direct and non-transitive.

Deploy NAT Gateways in multiple Availability Zones (AZs) and update the route tables to direct traffic accordingly.

Yes, AWS supports inter-region VPC peering.

Use private subnets, Security Groups, Network ACLs, VPC Flow Logs, least privilege IAM, and avoid wide-open access in security rules.

Multicast is used for streaming data to multiple subscribers; AWS VPC does not natively support multicast, requiring alternative configurations like IPsec.

AWS offers DNS resolution through Amazon-provided DNS and enables private DNS for internal resources.

A route table defines how traffic is directed within the VPC or to external networks.

Through inter-region VPC peering or Transit Gateway attachments across regions.

A default VPC is a pre-configured VPC provided in each region, allowing easy setup for users.

You can add secondary CIDR blocks to the VPC.

A Local Zone brings AWS resources closer to users, extending a VPC’s reach to specific geographic locations.

Latency can affect performance; direct peering or Transit Gateways may be used to minimize latency.

Public IPs are automatically assigned and released, while Elastic IPs remain constant.

IAM policies control user permissions on VPC resources, ensuring least privilege access.

Access to S3 from VPC can be achieved through VPC Endpoints, enabling private access without public internet.

Talk to Our Career Expert

We'd Love to hear from you

WhatsApp