Answers to common AWS interview questions

🌐 AWS Basics

1. What is AWS? What are the core advantages?

Understand the basic concepts of AWS cloud computing services

  • AWS definition:Amazon Web Services, the cloud computing platform provided by Amazon, provides the world's most comprehensive cloud services.
  • Core advantages:
  • The global infrastructure covers a wide range of regions and availability zones, supporting low-latency access.
  • The services are rich in variety, covering computing, storage, database, AI and other products.
  • Flexible expansion and pay-as-you-go model are conducive to cost optimization.
  • High availability and reliability, multi-availability zone and cross-region architecture support business continuity.
  • Strong security, with multiple safety and compliance certifications.

2. What are AWS’s cloud computing models?

Understand different cloud service delivery models

  • IaaS (Infrastructure as a Service):Provides basic resources such as virtual machines, storage, and networks. Typical services include EC2, EBS, and VPC. Users manage operating systems and applications.
  • PaaS (Platform as a Service):Provides a running environment and platform, and users only need to deploy code. Typical services include Elastic Beanstalk, RDS, and Lambda.
  • SaaS (Software as a Service):Provide complete applications that users can use directly. Typical services include hosted applications such as WorkSpaces and QuickSight.

3. What are AWS Regions and Availability Zones (AZ)?

Understand AWS global infrastructure layout

  • Region:Independent geographic regions, each containing multiple data center clusters, are isolated from each other for data residency and compliance.
  • Availability Zone:Independent data centers that are isolated from each other but interconnected at high speeds in a region. Usually a region contains multiple availability zones for high-availability deployment.
  • Design purpose:Implement disaster recovery and high availability through multi-availability zone deployment, and improve business continuity through cross-region deployment.

4. What does AWS’s free tier include?

Learn about the scope of AWS free services

  • 12-month free tier:Within one year after registration, new accounts can use some EC2, RDS, S3 and other services for free within a limited quota.
  • Permanent free tier:Some services provide long-term free usage, such as a certain number of Lambda invocations, DynamoDB storage and requests, etc.
  • Short term trial:Certain services offer a 30–60 day trial or feature trial quota.

5. What is AWS IAM? What is the function?

Understand identity and access management

  • IAM definition:Identity and Access Management, a service for managing users, roles, groups, and access policies.
  • Core elements:User (User), user group (Group), role (Role), policy (Policy).
  • Main functions:Finely control who can access which resources and what operations can be performed to implement the principle of least privilege and security compliance requirements.

💻 EC2 and Compute Services

6. What is EC2? What are the main features?

Learn about AWS elastic cloud computing services

  • EC2 definition:Elastic Compute Cloud, used to create and manage virtual machine instances in the cloud.
  • Main features:Supports multiple instance types, elastic scaling, different storage options (EBS, instance storage), security groups to control network access, and can be combined with load balancing and automatic expansion.
  • Typical uses:Web application server, batch processing tasks, background services, development and testing environment, etc.

7. What are the instance types of EC2?

Understand the different EC2 instance classifications

  • Universal type:Such as T series, M series, CPU and memory balance, suitable for most applications.
  • Calculation optimization type:Such as C series, suitable for high CPU-intensive workloads, such as batch processing and scientific computing.
  • Memory optimized:Such as R series and X series, suitable for memory-intensive applications such as large databases and caches.
  • Storage optimized:For example, the I/D series is suitable for high I/O database and analysis scenarios.

8. What are the payment models of EC2? How to choose?

Understand EC2 cost optimization strategies

  • On-demand instances:Time-of-use billing with no upfront payment is ideal for short-term or unpredictable loads.
  • Reserved Instances or Savings Plans:Commit to usage for a period of time in exchange for a larger discount, suitable for stable load.
  • Spot instance:Low price but may be interrupted, suitable for tasks with high fault tolerance.
  • Selection suggestions:Reserve or Savings Plan for core stable business, and On-Demand + Bidding hybrid for testing and batch processing.

9. What is Lambda? What are the advantages?

Understanding serverless computing services

  • Lambda definition:Serverless function computing service, you only need to write function code, and the execution is hosted by the platform.
  • Advantages:There is no need to manage servers, automatic expansion, billing based on the number of requests and execution time, and a large initial free quota.
  • Typical scenario:Event-driven tasks, API backends, data processing, scheduled tasks, etc.

10. What is Elastic Beanstalk? Applicable scenarios?

Learn about PaaS deployment services

  • Definition:An application hosting platform that automatically handles environment creation, deployment, scaling and monitoring.
  • Features:Supports multiple languages (Java, Node.js, Python, etc.) and can quickly launch applications without in-depth management of infrastructure.
  • Applicable scenarios:Small and medium-sized web services, API services, applications that require fast delivery.

💾 Storage and database

11. What is S3? What are the main features?

Understanding object storage services

  • S3 definition:Simple Storage Service, which provides object storage for any amount of data.
  • Features:High durability (11 nines), high availability, pay-per-use, version control, lifecycle management, and cross-region replication.
  • Common uses:Backup archiving, static website hosting, log storage, data lake, etc.

12. What are the storage types of S3? How to choose?

Understanding S3 Cost Optimization

  • Standard:Suitable for frequently accessed hot data with low latency.
  • Infrequent Access/Intelligent-Tiering:Suitable for data with less frequent access or uncertain access patterns and lower cost.
  • Glacier/Deep Archive:Suitable for data that is rarely accessed but needs to be saved for a long time, with the lowest cost but longer retrieval time.
  • Selection principle:Select the appropriate level based on access frequency and recovery time requirements, and automatically migrate based on life cycle policies.

13. What is the difference between EBS and S3?

Comparing block storage and object storage

  • EBS:Block storage, mounted on EC2 as a disk, is suitable for scenarios such as databases and file systems that require low-latency random reading and writing.
  • S3:Object storage, accessed via API or HTTP, suitable for large files, backups, media resources, and more.
  • Key differences:Access methods are different, performance characteristics are different, usage patterns and billing models are different.

14. What is RDS? What engines are supported?

Understanding managed relational databases

  • RDS definition:Relational Database Service hosts relational databases such as MySQL, PostgreSQL, MariaDB, SQL Server, Oracle, and Aurora.
  • Features:Automatic backup, automatic patching, multi-AZ deployment, read replicas, monitoring, and expansion and contraction.
  • Advantages:Reduce database operation and maintenance work and let the team focus on business logic.

15. What is DynamoDB? How is it different from RDS?

Understanding NoSQL Managed Services

  • DynamoDB:Fully managed NoSQL key-value and document database with millisecond response and auto-scaling.
  • Difference:RDS is relational and supports SQL and complex transactions; DynamoDB is schema-less and suitable for high-throughput, low-latency Internet applications.
  • Selection suggestions:RDS is used for strong relationships and complex queries, and DynamoDB is used for ultra-high concurrency and flexible structures.

🌍 Network and content distribution

16. What is a VPC? What does it do?

Understanding virtual private clouds

  • VPC definition:Virtual Private Cloud is a user-defined logically isolated network environment on AWS.
  • Function:IP segments, subnets, routing tables and gateways can be customized to achieve an isolated, secure and controllable network topology.
  • Common designs:Divide public subnets and private subnets, and build a multi-layer architecture with NAT, Internet Gateway, etc.

17. What is the difference between a public subnet and a private subnet?

Understand subnet role division

  • Public subnet:The routing table points to the Internet Gateway. Instances in the subnet can have public network access capabilities. Load balancing, springboards, etc. are usually deployed.
  • Private subnet:It is not directly exposed to the Internet and can be accessed externally through a NAT gateway. It is suitable for deploying back-end services such as application servers and databases.
  • Security:In the multi-layer architecture, the front end is in the public subnet and the core data remains in the private subnet to improve security.

18. What is the difference between ALB and NLB?

Understanding the different load balancers

  • ALB (application load balancing):Working on the seventh layer, it can perform intelligent routing based on URL path, host name, header, etc., and is suitable for HTTP/HTTPS microservices.
  • NLB (network load balancing):Working on the fourth layer, it targets TCP/UDP high-performance forwarding with extremely low latency and is suitable for high concurrency and real-time systems.
  • Select:Use ALB for Web/API and NLB for high-throughput, non-HTTP protocols.

19. What is CloudFront? What are the advantages?

Understanding CDN services

  • CloudFront definition:AWS's global content distribution network caches content to edge nodes around the world.
  • Advantages:Reduce latency, reduce pressure on the origin site, support HTTPS, customize domain names and integrate with WAF.
  • Application:Static websites, video distribution, API acceleration, etc.

20. What is Route 53? Main function?

Understanding DNS services

  • Route 53:A scalable DNS service from AWS that provides name resolution, health checks, and traffic routing policies.
  • Function:Supports multiple record types, weighted routing, deferred routing, geographic routing, and failover.
  • Application:Provide resolution services for domain names, and integrate with ELB, CloudFront, etc. to implement intelligent routing.

📊 Monitoring and management

21. What is CloudWatch? Main purpose?

Understand monitoring and alerting

  • CloudWatch:Monitoring and logging service that collects metrics and logs from AWS resources and custom applications.
  • Purpose:Create alerts, view dashboards, analyze logs, trigger auto-scaling or notifications.
  • Key points:Combine EC2, RDS, Lambda and other indicators for automated operation and maintenance.

22. How does Auto Scaling work?

Understand automatic scaling

  • Auto Scaling:Automatically scale up and down the number of EC2 instances based on load.
  • Workflow:Define Auto Scaling groups and policies to trigger scaling up or down via CloudWatch metrics such as CPU utilization.
  • Advantages:Improve availability, avoid resource waste, and achieve elastic scaling.

23. What does CloudTrail do?

Understanding auditing and tracking

  • CloudTrail:Log calls to AWS APIs in your account, including console operations, SDK calls, and more.
  • Function:For security auditing, issue tracking, and compliance demonstration, logs can be sent to S3 or CloudWatch Logs.
  • Key points:Can help answer "who did what operation on which resource at what time".

24. What is AWS Config?

Understanding configuration audit services

  • AWS Config:Document and evaluate configuration changes to AWS resources.
  • Purpose:View resource history configuration and check whether it complies with compliance rules (such as whether S3 enforces encryption).
  • Advantages:Help build compliance reporting and automate remediation processes.

25. What are the capabilities of AWS Systems Manager?

Understand unified operation and maintenance management

  • Systems Manager:Provides functions such as patch management, parameter storage, automated tasks, and remote execution.
  • Common functions:Run Command, Session Manager, Parameter Store, Automation, Patch Manager, etc.
  • Advantages:Centrally manage multi-region, multi-account and multi-instance operation and maintenance operations.

🔐 Security and Compliance

26. What is the AWS Shared Responsibility Model?

Understand the division of security responsibilities

  • Concept:AWS is responsible for the security of the "cloud itself" (data center, hardware, underlying services), and the customer is responsible for the "security on the cloud" (operating system, applications, data, permissions).
  • Meaning:Clear boundaries help companies implement their own security controls and compliance measures.

27. What is the difference between security groups and network ACLs?

Understand network security controls

  • Security group:Instance-level firewall, stateful, only need to configure allow rules.
  • Network ACL:Subnet-level firewall, stateless, needs to configure both inbound and outbound rules, supports explicit rejection.
  • Use in combination:First use NACL for coarse-grained filtering, and then use security groups for fine-grained control.

28. What is the difference between KMS and Secrets Manager?

Understand encryption and key management

  • KMS:Manage encryption keys and provide encryption and decryption capabilities for S3, EBS, RDS, etc.
  • Secrets Manager:Store and rotate sensitive information (e.g. database passwords, API keys), also internally with the help of KMS encryption.
  • Summary:KMS is responsible for the life cycle management of the keys themselves, and Secrets Manager manages the storage and access of secret values.

29. What are AWS Artifacts?

Understanding Compliance Documentation Services

  • Artifact:Provides self-service download access to AWS compliance reports and certification documents.
  • Purpose:Meet corporate or regulatory agency requirements for proof of compliance such as ISO, SOC, PCI, etc.
  • Value:Reduce the cost of round-trip communication with AWS support and accelerate audit and compliance processes.

30. How does AWS Shield differ from WAF?

Understanding DDoS and Application Security

  • AWS Shield:The protection service against DDoS attacks is divided into free basic version and paid premium version.
  • AWS WAF:Web application firewall is used to intercept application layer attacks such as SQL injection and XSS, and can write rules to filter malicious requests.
  • Combination strategy:Generally, Shield + WAF + CloudFront/ALB are used together to improve overall security.

💼 Application integration and messaging services

31. What is the difference between SQS and SNS?

Understanding queues and publish and subscribe

  • SQS:Message queue service, consumers actively pull messages, suitable for synchronous decoupling and peak-shaving and valley-filling.
  • SNS:Publish and subscribe service, push messages one-to-many to subscription endpoints (such as email, SQS, HTTP, Lambda).
  • Common patterns:Use SNS to broadcast, and then send messages to multiple SQS queues for consumption by different services.

32. What is the main function of API Gateway?

Understand API management and gateways

  • Function:As a unified portal management API, it supports authentication, rate limiting, flow control, request conversion and monitoring.
  • Integration:Requests can be routed to Lambda, EC2, other HTTP services, or private VPC endpoints.
  • Advantages:Simplify API publishing and version management, and improve security and observability.

33. What are the common components for building a microservices architecture on AWS?

Understand the microservice ecosystem

  • Computing layer:Lambda, ECS/Fargate, EKS or EC2.
  • Communication layer:API Gateway, ALB, SQS, SNS, etc.
  • Data layer:DynamoDB, RDS/Aurora, S3.
  • Observation and management:CloudWatch, X-Ray, CloudTrail, Config, etc.

34. What does ECS have to do with Fargate?

Understand container operating modes

  • ECS:AWS self-developed container orchestration service that can run tasks on self-managed EC2 clusters or Fargate.
  • Fargate:With the serverless container running engine, users do not need to manage the underlying EC2 and only need to define container resource requirements.
  • Summary:ECS manages container orchestration and task definition, and Fargate manages underlying computing resources.

35. What are some common practices for AWS cost optimization?

Understanding cloud cost governance

  • Resource optimization:Regularly check idle and low-utilization resources and downgrade or shut down them appropriately.
  • Buying strategy:Mix and match On-Demand, Reserved, Savings Plan, and Spot Instances.
  • Storage optimization:Leverage S3 lifecycle, appropriate storage tiers, and EBS snapshot strategies.
  • Monitor:Set budgets and alerts to keep track of costs with Cost Explorer and Budgets.

💡 AWS Interview Preparation Advice

Master core services:Focus on familiarity with basic services and common combinations such as EC2, S3, RDS, Lambda, VPC, etc.

Combined with architectural scenarios:Think more about solution design from the perspectives of high availability, scalability and cost.

Experiment more:Create VPCs, deploy applications, and configure monitoring and alerting in the actual console.

Pay attention to safety:Understand IAM, network isolation, and encryption policies, and proactively consider security considerations when answering questions.

Make good use of official documentation:Before the interview, check your knowledge blind spots against official best practices.