Skip to content

AWS Engineer interview questions

100 real questions with model answers and explanations for Associate Cloud Engineer candidates.

See a AWS Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

regions

An AWS Region is a separate geographic area where AWS operates multiple Availability Zones.

  • I would first meet data residency and compliance requirements because they can rule out otherwise suitable Regions.
  • I would confirm that the required services and instance types are available there, since AWS offerings differ by Region.
  • I would then compare latency to users and regional pricing, keeping dependent resources close to avoid transfer delay and cost.

Why interviewers ask this: The interviewer is checking whether you can connect the definition of a Region to basic placement decisions.

availability

An Availability Zone is an isolated location within a Region with independent power, cooling, and networking.

  • AZs in one Region are connected by high-bandwidth, low-latency links, so an application can operate across them.
  • I would place redundant application instances in at least two AZs so one location does not become the only failure point.
  • Cross-AZ traffic can add data transfer cost, so I would gain resilience deliberately rather than spread resources without a reason.

Why interviewers ask this: A strong answer distinguishes an AZ from a Region and explains the practical availability benefit.

edge-network

Edge locations bring selected AWS services closer to users without running the whole workload in every location.

  • CloudFront caches content at edge locations, which reduces latency and load on the origin.
  • Route 53 and AWS Shield also use the global edge network for DNS responses and traffic protection.
  • An edge location is not an Availability Zone, so I would still deploy the application's compute and database in a Region.

Why interviewers ask this: The interviewer wants to see that you understand the edge network without confusing it with regional infrastructure.

AWS secures the cloud infrastructure, while the customer secures what they configure and run in the cloud.

  • AWS is responsible for facilities, physical hardware, and the foundational networking and virtualization layers.
  • The customer manages identities, data access, network rules, and guest operating system patches on EC2.
  • The boundary shifts with managed services, so AWS patches the RDS host while I still control database users, encryption, and configuration.

Why interviewers ask this: The interviewer is evaluating whether you can assign concrete security tasks to the correct party.

The control plane manages resource configuration, while the data plane handles the workload's actual traffic and data.

  • Creating an S3 bucket, changing an IAM policy, or launching an EC2 instance uses control plane APIs.
  • Reading an S3 object or serving an application request through an instance is data plane activity.
  • I separate their permissions and monitoring because an operator may need to deploy a resource without reading the customer data it processes.

Why interviewers ask this: A strong answer gives clear AWS examples and shows why the distinction matters for access control.

iam

I use users for specific people or exceptional long-lived identities, groups to organize user permissions, and roles for temporary access.

  • A group can give several IAM users the same job-based policies, but a group cannot be assumed like a role.
  • EC2, Lambda, federated employees, and cross-account principals should assume roles instead of storing access keys.
  • For a human workforce I would prefer IAM Identity Center, reserving IAM users for cases that truly require them.

Why interviewers ask this: The interviewer checks whether you choose temporary role credentials instead of creating users for every use case.

iam

AWS allows a request only when an applicable policy allows it and no applicable policy explicitly denies it.

  • Requests start with an implicit deny, so having no matching Allow statement means access is refused.
  • An explicit Deny overrides an Allow from an identity policy or resource policy.
  • Permission boundaries and organization policies can limit an Allow, but they do not grant permission by themselves.

Why interviewers ask this: The interviewer is testing the core policy evaluation rules rather than simple policy syntax recall.

least-privilegeiam

Least privilege means granting only the actions and resources needed for a defined task.

  • I would replace a broad action such as s3:* with exact operations such as s3:GetObject on one bucket prefix.
  • I would add conditions where useful, such as requiring a specific source VPC endpoint or resource tag.
  • I would review CloudTrail activity and IAM Access Analyzer findings to remove permissions that the workload does not use.

Why interviewers ask this: A strong answer turns least privilege into a specific policy scope and an ongoing review practice.

I would require MFA for every human identity with console or privileged access and for the root user if root credentials exist.

  • Centralized root access in AWS Organizations can remove root credentials from member accounts; otherwise root should have no access keys, use securely stored MFA, and be reserved for root-only tasks.
  • IAM Identity Center can enforce MFA centrally for workforce sign-in instead of configuring separate IAM users.
  • MFA reduces damage from a stolen password, but workloads should use roles rather than interactive MFA or long-lived keys.

Why interviewers ask this: The interviewer checks whether you protect human access while keeping machine authentication role-based.

temporary-credentials

AWS Security Token Service issues temporary credentials for an assumed role or federated session.

  • The credentials include an access key ID, secret access key, session token, and expiration time.
  • A service, user, or external identity assumes a role and receives only the permissions attached to that session.
  • Expiring credentials reduce the useful lifetime of a leak and avoid distributing permanent keys to EC2 instances or CI jobs.

Why interviewers ask this: The interviewer is evaluating whether you understand the mechanism behind role-based temporary access.

networking

A VPC CIDR block defines the private IP address range from which its subnets receive addresses.

  • I would choose enough address space for expected subnets and growth because every subnet reserves part of that range.
  • I would avoid overlap with office networks, other VPCs, and planned partner networks so routing can work later.
  • For IPv4 I would normally use an RFC 1918 range such as 10.20.0.0/16 and divide it into smaller subnet CIDRs.

Why interviewers ask this: A strong answer connects CIDR sizing and overlap to practical network growth and connectivity.

networking

A subnet is public when its route table has a route to an internet gateway, while a private subnet has no direct route there.

  • A resource in a public subnet also needs a public IPv4 address or IPv6 address and suitable security rules to use the internet path.
  • I would put internet-facing load balancers in public subnets and application instances or databases in private subnets.
  • Private resources can still make outbound IPv4 connections through a NAT gateway without accepting unsolicited inbound internet traffic.

Why interviewers ask this: The interviewer wants the routing definition of public and private, not a naming convention.

networking

A route table maps destination CIDR blocks to targets such as a local VPC path, internet gateway, or NAT gateway.

  • Each subnet is associated with one route table, either explicitly or through the VPC's main route table.
  • The built-in local route lets subnets in the same VPC communicate unless security controls block the traffic.
  • When several routes match, AWS uses the most specific prefix, so 10.0.1.0/24 wins over 10.0.0.0/16.

Why interviewers ask this: A strong answer explains subnet association, route targets, and longest-prefix matching.

gatewaynetworking

An internet gateway is the VPC target that enables communication between public IP addresses in the VPC and the internet.

  • I attach one internet gateway to the VPC and add a route such as 0.0.0.0/0 from public subnet route tables.
  • For IPv4, it performs the public-to-private address translation for an instance that has a public IPv4 address.
  • It does not open ports by itself, because security groups, network ACLs, and host firewalls still control traffic.

Why interviewers ask this: The interviewer checks whether you understand that an internet gateway provides a route, not automatic public access.

gatewaynetworking

A NAT gateway lets resources in a private subnet initiate outbound IPv4 connections without becoming directly reachable from the internet.

  • I place the public NAT gateway in a public subnet, associate an Elastic IP, and route the private subnet's 0.0.0.0/0 traffic to it.
  • Return traffic for an established connection is allowed, but an internet client cannot initiate a connection through that gateway.
  • For resilient multi-AZ designs I use a NAT gateway per AZ, while accounting for hourly and data processing charges.

Why interviewers ask this: A strong answer describes the traffic direction, required routing, and basic availability and cost trade-off.

networking

A security group is a stateful firewall for attached resources, while a network ACL is a stateless filter at the subnet boundary.

  • Security groups contain allow rules only, and response traffic is automatically allowed for an accepted connection.
  • Network ACLs support both allow and deny rules, process numbered rules in order, and require explicit return-path rules.
  • I use security groups as the main workload control and keep NACLs as a broader subnet guardrail when one is needed.

Why interviewers ask this: The interviewer is testing scope, statefulness, and rule behavior rather than just two service names.

dns

I would use Route 53 hosted zones, with public zones for internet DNS and private zones for selected VPCs.

  • A public hosted zone can map app.example.com to an ALB using an alias record.
  • A private hosted zone resolves only from associated VPCs, which suits internal service names such as db.internal.example.com.
  • VPC DNS support and DNS hostnames must be configured correctly so workloads can use the Amazon-provided resolver and generated names.

Why interviewers ask this: A strong answer distinguishes public and private DNS and gives a practical Route 53 mapping.

An Elastic IP is a static public IPv4 address that I can associate with a supported resource in one Region.

  • It is useful when an allowlist requires a stable source address, such as outbound traffic through a NAT gateway.
  • I would not assign one to every EC2 instance because load balancers and DNS usually provide cleaner application endpoints.
  • Public IPv4 addresses are billed and scarce, so I would release an Elastic IP as soon as it is no longer required.

Why interviewers ask this: The interviewer checks whether you know the stable-address use case and avoid unnecessary public IPv4 allocation.

networking

VPC peering provides private IP connectivity between two VPCs through the AWS network.

  • I create and accept the peering connection, add routes in both VPCs, and allow the traffic in security controls.
  • The VPC CIDR ranges must not overlap because AWS needs unambiguous routes between them.
  • Traffic stays on AWS infrastructure, but normal cross-AZ and inter-Region data transfer charges can still apply.

Why interviewers ask this: A strong answer includes the routing and non-overlapping CIDR requirements instead of treating peering as automatic connectivity.

networking

VPC peering is not transitive, so one peering connection cannot be used as a router to another VPC.

  • If VPC A peers with B and B peers with C, A cannot reach C through B.
  • I would create the required direct peerings for a small network and maintain explicit routes for each connection.
  • For many VPCs that need hub-and-spoke routing, I would evaluate AWS Transit Gateway instead of a large peering mesh.

Why interviewers ask this: The interviewer is checking a basic design boundary that prevents incorrect hub routing through peering.

Locked questions

  • 21

    How would you choose an EC2 instance family for a workload?

    computeaws
  • 22

    What is an Amazon Machine Image, and what does it contain?

  • 23

    What is the difference between EBS and EC2 instance store?

    computestorageaws
  • 24

    What is EC2 user data used for?

    computeaws
  • 25

    How would you securely access a Linux EC2 instance for administration?

    computeaws
  • 26

    When would you choose an Application Load Balancer instead of a Network Load Balancer?

    load-balancing
  • 27

    What is a load balancer target group?

    load-balancing
  • 28

    What do minimum, maximum, and desired capacity mean in an EC2 Auto Scaling group?

    scalingcapacitycompute
  • 29

    How do EC2 and load balancer health checks affect an Auto Scaling group?

    scalingload-balancingcompute
  • 30

    Why does an Auto Scaling group use an EC2 launch template?

    scalingcomputeautoscaling
  • 31

    How are data and folders represented in Amazon S3?

    object-storageaws
  • 32

    How would you choose an S3 storage class?

    object-storageaws
  • 33

    What does S3 Versioning protect against?

    object-storageversioningaws
  • 34

    What can an S3 Lifecycle configuration do?

    configawsobject-storage
  • 35

    What does S3 Block Public Access do?

    object-storageaws
  • 36

    What encryption options would you consider for objects in S3?

    encryptionawsobject-storage
  • 37

    When would you use an S3 presigned URL, and when would you put CloudFront in front of S3?

    object-storagecdnaws
  • 38

    What does Amazon RDS manage, and which database engines can it run?

    databaserds
  • 39

    What does a standard RDS Multi-AZ DB instance deployment provide?

    rdsdeployment
  • 40

    What is an RDS read replica used for?

    replicationrds
  • 41

    What is the difference between RDS automated backups and manual DB snapshots?

    rdssnapshotbackups
  • 42

    Why is the partition key important in DynamoDB, and how would you choose a capacity mode?

    dynamodbpartitioningcapacity
  • 43

    What is Amazon ElastiCache used for?

    caching
  • 44

    How does the AWS Lambda execution model work?

    serverlesslambda
  • 45

    What role does Amazon API Gateway play in a serverless application?

    api-gatewaygateway
  • 46

    When would you use SQS instead of SNS?

    queuespub-sub
  • 47

    What is Amazon EventBridge used for?

    events
  • 48

    How do CloudWatch metrics, logs, and alarms work together?

    monitoring
  • 49

    What does declarative Infrastructure as Code mean in CloudFormation or Terraform?

    terraformiac
  • 50

    How would you establish basic AWS cost visibility for a small project?

    css
  • 51

    SSH to a new EC2 instance times out on port 22, although the instance is running; what would you check first?

    sshawscompute
  • 52

    A web server on EC2 listens on port 80 locally, but a browser request times out; its security group only allows port 22. What would you change and verify?

    networkingcomputeaws
  • 53

    An EC2 instance has a public IPv4 address and allows port 22, but SSH still times out; the subnet route table has no 0.0.0.0/0 route. What would you check?

    networkingcomputessh
  • 54

    SSH reaches an EC2 instance but returns Permission denied (publickey) after you moved to a new laptop; how would you diagnose it?

    sshawscompute
  • 55

    An EC2 deployment fails with No space left on device, and the 20 GB root volume shows 100 percent usage; what would you do?

    deploymentawscompute
  • 56

    An EC2 application receives AccessDenied from S3, but a teammate says the instance role already allows the bucket; what exact checks would you make?

    computeobject-storageaws
  • 57

    User data was supposed to install Nginx on first boot, but port 80 is closed ten minutes later; how would you debug it?

  • 58

    After an EC2 stop and start, the old IP no longer works, and a newly attached data volume is not visible at /data; what would you check?

    computeaws
  • 59

    An ALB reports two targets as unhealthy because GET /health returns 404, while the home page returns 200; what would you change?

  • 60

    An application listens on HTTP port 8080, but its ALB target group sends HTTP health checks to port 80 and all targets time out; how would you fix it?

    health-checkshttp
  • 61

    An Auto Scaling group stays at one instance while CPU remains above 85 percent for 15 minutes; what would you inspect?

    scalingautoscaling
  • 62

    A public ALB must reach EC2 instances in private subnets, but requests return 504; which routes and security groups would you verify?

    networkingcomputeaws
  • 63

    Instances in a private subnet cannot download package updates, although a NAT gateway exists; the subnet route sends 0.0.0.0/0 to an internet gateway. What would you correct?

    gatewaynetworking
  • 64

    A Route 53 name for a new ALB returns NXDOMAIN 20 minutes after deployment; what exact records would you check?

    dnsdeployment
  • 65

    HTTPS worked until a network ACL was tightened; the security group still allows port 443, but responses now time out. How would you compare the controls?

    networkinghttps
  • 66

    A client at 10.20.4.18 cannot reach an EC2 service on port 8443, and VPC Flow Logs show REJECT; how would you use that record?

    networkingcomputeaws
  • 67

    A deployment role can list an S3 bucket but receives AccessDenied when uploading reports/prod.csv; what would you inspect?

    deploymentawsobject-storage
  • 68

    A team disables S3 Block Public Access to fix a 403 on a static site bucket; how would you handle the symptom more safely?

    object-storageaws
  • 69

    A user accidentally deletes invoices/2026-07.csv from a versioned S3 bucket five minutes ago; how would you restore it?

    object-storageaws
  • 70

    A browser upload to S3 fails its CORS preflight, while the same PUT succeeds from curl; what would you check?

    http-toolsawscors
  • 71

    Objects under logs/ are still in S3 Standard after 40 days, although a lifecycle rule should transition them after 30 days; what would you inspect?

    object-storageaws
  • 72

    An S3 client in eu-west-1 receives PermanentRedirect for a bucket created in us-east-1; what would you change?

    object-storageaws
  • 73

    A presigned S3 download works immediately but returns expired after 15 minutes, while users expect one hour; what would you inspect?

    object-storageaws
  • 74

    A new app.js was uploaded to the same S3 key, but CloudFront still serves the old 120 KB file after ten minutes; what would you do?

    object-storagecdnaws
  • 75

    A developer's laptop times out connecting to an RDS endpoint that resolves to 10.0.3.25; the database is marked not publicly accessible. What would you explain and check?

    databaserdsendpoints
  • 76

    An EC2 application times out connecting to PostgreSQL on RDS port 5432, and both resources are in the same VPC; what security group rule would you verify?

    networkingcomputepostgres
  • 77

    An RDS instance reports only 5 percent free storage and writes are beginning to fail; what immediate checks and action would you take?

    rds
  • 78

    A team expects seven days of RDS recovery points, but the console shows automated backup retention of one day; what would you do?

    retentionbackupsrds
  • 79

    An RDS read replica is 180 seconds behind during a report job, and users cannot see recent orders on read-only pages; what would you check?

    replicationrds
  • 80

    DynamoDB GetItem returns ValidationException: The provided key element does not match the schema for a table with pk and sk; what would you inspect?

    schemadynamodbvalidation
  • 81

    A DynamoDB table provisioned for 20 write units starts throttling during a burst of 60 writes per second; what would you check and change?

    dynamodb
  • 82

    A Lambda function has a 3-second timeout, but its downstream API usually responds in 5 seconds; how would you debug the failure?

    resilienceserverlessapi
  • 83

    A Lambda invocation exits with Runtime exited with error: signal: killed at 128 MB while processing a 20 MB file; what would you do?

    concurrencylambdaserverless
  • 84

    A new Lambda version logs DATABASE_URL missing and then gets AccessDenied for Secrets Manager; which configuration would you verify?

    secretsdatabaseconfig
  • 85

    A Lambda invocation returns success, but no log group appears in CloudWatch after five test runs; what would you check?

    serverlesslambdamonitoring
  • 86

    API Gateway returns 502 for a Lambda integration, while direct Lambda tests succeed with a plain JSON object; what would you inspect?

    gatewayserverlessapi
  • 87

    An SQS worker takes 45 seconds, but the same message becomes visible again every 30 seconds and is processed twice; what would you change?

    queuesconcurrency
  • 88

    A poison SQS message has failed five times but never appears in the configured dead-letter queue; what would you inspect?

    queuesconfigdata-structures
  • 89

    An SNS email subscription has shown PendingConfirmation for 30 minutes and receives no test notification; what would you check?

    pub-sub
  • 90

    A CloudWatch alarm shows INSUFFICIENT_DATA for 20 minutes after an instance was stopped; what would you inspect?

    monitoring
  • 91

    A CloudWatch Logs Insights query finds zero ERROR lines during a 10-minute incident, but the application logs lowercase error; how would you correct the search?

    incidentsqueriesmonitoring
  • 92

    A security group gained a 0.0.0.0/0 SSH rule at 14:20, and you need to identify who changed it; how would you use CloudTrail?

    networkingssh
  • 93

    A CloudFormation stack rolls back because it tries to create an S3 bucket name that already exists; what would you do first?

    iacawsobject-storage
  • 94

    Terraform plan says an EC2 instance must be replaced after only the AMI value changed; how would you review the plan before applying it?

    terraformawscompute
  • 95

    A CI Terraform job is blocked by a state lock from another run, and its stored AWS access key expired yesterday; how would you fix both issues?

    terraform
  • 96

    The monthly AWS estimate jumps by $180, Cost Explorer highlights NAT data processing, and two development EC2 instances average 2 percent CPU; how would you investigate?

    networkingcomputeestimation
  • 97

    A cost report cannot assign 30 percent of this month's spend because many resources have no owner or environment tag; what would you change?

  • 98

    An automated EBS snapshot job reports success nightly, but no snapshot has been restored in six months; what small AWS restore drill would you run?

    storagesnapshot
  • 99

    An ALB-backed EC2 API still shows 8 percent target 5xx errors when your shift ends; what AWS-specific handoff would you give the next engineer?

    computeapiaws
  • 100

    During code review, a deployment policy grants iam:PassRole on * so a release job can create one Lambda function; what change would you request?

    code-reviewdeploymentlambda