AWS Difference Between Interview Questions: Networking, Messaging, Security and DevOps Comparisons with Tables (SQS vs SNS vs EventBridge, VPN vs Direct Connect) (50 Questions)
This page has 50 AWS comparison interview questions on networking, messaging and integration, security and DevOps. Each answer gives a short table and ends with when to pick which, so you can answer "what is the difference between X and Y?" clearly and quickly.
1. An everyday example: roads, post offices and locks
Why compare these services?
Networking, messaging and security services often look similar on paper. Interviewers ask you to compare them to see whether you would pick the right one in a real design, and whether you know their limits.
Think of a town. Networking services are the roads, gates and private tunnels. Messaging services are the post office (queues), the notice board (pub/sub) and the dispatcher who routes letters by rules (event bus). Security services are the locks, keys, guards and CCTV.
How to use this page
- Learn the rows in each table and the final pick line.
- Practise saying each answer aloud in about a minute.
- Prices and quotas change, so the tables compare how services work rather than exact numbers.
2. Fresher level questions
Start here if you are a fresher or have less than two years of experience. Try to answer each question aloud first. Then open it and compare.
Q1. Security groups and network ACLs both filter traffic. Can you compare them in a table and say which you rely on? Fresher
| Point | Security group | Network ACL |
|---|---|---|
| Attached to | Network interfaces (instances, endpoints, load balancers) | Subnets |
| State | Stateful: replies allowed automatically | Stateless: allow both directions explicitly |
| Rules | Allow only | Allow and deny, numbered order |
| Typical use | Main access control per workload | Coarse subnet guardrails, blocking specific ranges |
Pick security groups as the primary control (reference other security groups instead of IPs). Use NACLs for extra subnet-level rules such as blocking a known bad range, and remember ephemeral ports for replies.
Q2. NAT gateway or NAT instance for private subnets: how do they compare today? Fresher
| Point | NAT gateway | NAT instance |
|---|---|---|
| Management | Fully managed | Your EC2 instance: patching, scaling, failover |
| Availability | Highly available within an AZ | Single instance unless you build failover |
| Bandwidth | Scales automatically to high levels | Limited by instance type |
| Cost | Hourly plus per GB processed | Instance cost; can be cheaper for tiny dev setups |
Pick a NAT gateway (one per AZ) for production. A NAT instance only fits very small labs or special needs like port forwarding, and you own its reliability.
Q3. Application Load Balancer or Network Load Balancer: which do you put in front of a service? Fresher
| Point | ALB | NLB |
|---|---|---|
| Layer | HTTP and HTTPS (layer 7) | TCP, UDP, TLS (layer 4) |
| Routing | Paths, hosts, headers, query strings | Ports only |
| Static IP | No (use Global Accelerator) | Yes, one per AZ, Elastic IPs possible |
| Features | WAF, authentication, redirects, gRPC | Very high throughput, preserves client IP, PrivateLink services |
Pick ALB for web apps and APIs. Pick NLB for non-HTTP protocols, static IP needs, extreme throughput, or to expose a service through PrivateLink.
Q4. Site-to-Site VPN or Direct Connect for connecting an office or data centre? Fresher
| Point | Site-to-Site VPN | Direct Connect |
|---|---|---|
| Path | Encrypted IPsec tunnels over the internet | Private dedicated link to AWS |
| Setup time | Minutes to hours | Weeks (provider and cross-connect) |
| Performance | Varies with internet; per-tunnel bandwidth limit | Consistent latency, high bandwidth |
| Cost | Low | Port hours plus data transfer, provider fees |
Pick VPN for quick, small or backup connectivity. Pick Direct Connect for steady large traffic, predictable latency or compliance, often with a VPN as backup.
Q5. CloudWatch, CloudTrail and AWS Config sound similar. How do you tell them apart? Fresher
| Service | Answers the question | Example |
|---|---|---|
| CloudWatch | How is it performing? | CPU is 90%, error logs, alarms |
| CloudTrail | Who did what, and when? | User ravi.ops called DeleteBucket at 22:14 |
| AWS Config | What did this resource look like over time, and is it compliant? | Security group sg-0abc allowed port 22 from anywhere between 10:00 and 11:30 |
Use all three together: CloudWatch to notice a problem, CloudTrail to find who changed something, and Config to see the configuration before and after and to enforce rules.
Q6. SQS, SNS or EventBridge: how do you choose for passing messages between services? Fresher
| Point | SQS | SNS | EventBridge |
|---|---|---|---|
| Pattern | Queue: consumers pull | Pub/sub: pushes to subscribers | Event bus: routes events by rules |
| Consumers | One consumer group per queue | Many subscribers | Many targets per rule |
| Filtering | None at queue level | Subscription filter policies | Rich content-based rules |
| Extras | Buffering, retries, DLQ | SMS, email, mobile push, fan-out | SaaS and AWS service events, archive and replay, schedules |
Pick SQS to buffer work for one service, SNS for fast fan-out, and EventBridge for event-driven architectures with many producers and routing rules. They are often combined (SNS or EventBridge into SQS).
Q7. KMS, Secrets Manager and Parameter Store: what does each one store? Fresher
| Point | KMS | Secrets Manager | Parameter Store |
|---|---|---|---|
| Stores | Encryption keys (never leave KMS unencrypted) | Secrets such as database passwords and API keys | Configuration values, optionally encrypted |
| Rotation | Automatic key rotation | Built-in secret rotation with Lambda | No built-in rotation |
| Cost | Per key and per request | Per secret and per API call | Standard parameters free; advanced paid |
Pick KMS to encrypt data, Secrets Manager for credentials that must rotate, and Parameter Store for settings and feature flags. Secrets Manager and Parameter Store use KMS underneath.
Q8. CloudFormation, Terraform or CDK: how would you compare them in a table? Fresher
| Point | CloudFormation | Terraform | CDK |
|---|---|---|---|
| Language | YAML or JSON | HCL | TypeScript, Python, Java, C#, Go |
| Clouds | AWS | Many providers | AWS (synthesises CloudFormation) |
| State | Managed by AWS | State file you store and lock | Managed by CloudFormation |
| Strength | Native, no extra tools | Multi-cloud, huge ecosystem | Real code, loops, reusable constructs |
Pick CloudFormation for simple AWS-only stacks, CDK for developer teams who like code, and Terraform when you manage several clouds or SaaS providers from one tool.
Q9. A bastion host or Session Manager for reaching private servers? Fresher
| Point | Bastion host | Session Manager |
|---|---|---|
| Inbound ports | SSH or RDP open on the bastion | None |
| Credentials | SSH keys to manage | IAM permissions |
| Logging | You set up | Session logs to S3 or CloudWatch, CloudTrail events |
| Ops | Patch and harden the bastion | Managed; SSM agent on instances |
Pick Session Manager for almost all new setups. A bastion is only needed for tools that cannot use Session Manager, and even then Session Manager port forwarding often replaces it.
Q10. Amazon ECR or Docker Hub for storing images used in AWS? Fresher
| Point | Amazon ECR | Docker Hub |
|---|---|---|
| Access control | IAM, repository policies, cross-account | Docker accounts and tokens |
| Network | Private access through VPC endpoints | Internet |
| Rate limits | AWS quotas | Pull rate limits for anonymous and free users |
| Features | Image scanning, lifecycle policies, replication, pull-through cache | Large public catalogue |
Pick ECR for your own images and use its pull-through cache for public images, so builds and deployments do not break because of public rate limits.
Q11. Rolling, blue/green or canary deployment: how do you explain the difference with a table? Fresher
| Point | Rolling | Blue/green | Canary |
|---|---|---|---|
| How | Replace instances a batch at a time | New full environment, then switch traffic | Small share of traffic to new version first |
| Rollback | Slow, roll forward or back in batches | Fast: switch back | Fast: move traffic back |
| Extra capacity | Little | Double during deploy | Small |
| Risk exposure | Mixed versions during rollout | All users at once after switch | Only a few users at first |
Pick rolling for simple stateless apps with low risk, blue/green for quick rollback of big releases, and canary for high-traffic services where you want real-user proof before full rollout.
Q12. Amazon Inspector, GuardDuty and Macie: what does each one look for? Fresher
| Service | Looks for | Example finding |
|---|---|---|
| Inspector | Software vulnerabilities and network exposure in EC2, ECR images and Lambda | Package with a known CVE on an instance |
| GuardDuty | Threats from activity: logs, DNS, network, runtime | Instance talking to a known crypto-mining server |
| Macie | Sensitive data in S3 | Bucket contains files with card numbers |
Pick all three in a mature account: Inspector to fix weaknesses, GuardDuty to detect attacks, Macie to know where sensitive data lives. Security Hub collects their findings in one place.
Q13. AWS Config or CloudTrail for answering "was this security group open last Tuesday?" Fresher
| Point | CloudTrail | AWS Config |
|---|---|---|
| Records | API calls (AuthorizeSecurityGroupIngress by whom) | Resulting configuration items over time |
| Question answered | Who changed it and from where | What the full rule set looked like at any time |
| Compliance rules | No | Yes: managed and custom rules, remediation |
Pick Config to see the state at a time and to check compliance; pick CloudTrail to find the person or role behind the change. Use them together in investigations.
Q14. AWS Client VPN or Site-to-Site VPN: which one for remote employees? Fresher
| Point | Client VPN | Site-to-Site VPN |
|---|---|---|
| Connects | Individual laptops | A whole network (office, data centre) |
| Software | OpenVPN-based client on each device | Customer gateway device or software router |
| Authentication | Certificates, Active Directory, SAML | Pre-shared keys or certificates per tunnel |
| Billing | Per endpoint association and per connection hour | Per connection hour and data transfer |
Pick Client VPN for remote staff reaching private AWS resources. Pick Site-to-Site VPN to connect an office network. For web apps only, Verified Access can give zero-trust access without a VPN.
Q15. Route 53 Resolver inbound or outbound endpoints: which direction does each handle? Fresher
| Point | Inbound endpoint | Outbound endpoint |
|---|---|---|
| Direction | On-premises DNS servers query AWS private zones | VPC resources query on-premises DNS |
| Configured with | On-premises conditional forwarders pointing to endpoint IPs | Resolver rules forwarding domains (corp.example.com) to on-premises DNS |
| Example | Office laptop resolves db.internal.aws.example.com | EC2 resolves fileserver.corp.example.com |
Pick inbound when on-premises needs AWS names, outbound when AWS needs on-premises names; hybrid networks usually need both.
Q16. Amazon MQ or SQS for an application moving from on-premises messaging? Fresher
| Point | Amazon MQ | SQS |
|---|---|---|
| Protocols | AMQP, MQTT, STOMP, OpenWire, JMS (ActiveMQ, RabbitMQ) | AWS API only |
| Migration effort | Little: same broker protocols | Code changes to use the SQS API |
| Scaling | Broker instances you size | Practically unlimited, serverless |
| Ops | Broker maintenance windows, storage | None |
Pick Amazon MQ to lift existing apps that use ActiveMQ or RabbitMQ with minimal changes. Pick SQS for new cloud-native designs.
Q17. AWS KMS or CloudHSM: when is KMS not enough? Fresher
| Point | KMS | CloudHSM |
|---|---|---|
| Tenancy | Multi-tenant managed service (FIPS validated HSMs) | Single-tenant HSMs in your VPC |
| Key control | AWS operates the HSMs | You alone manage users and keys |
| Integration | Native with most AWS services | PKCS#11, JCE, CNG for your apps; custom key store for KMS |
| Ops | None | Cluster sizing, high availability, backups |
Pick KMS for nearly all encryption in AWS. Pick CloudHSM when rules require single-tenant HSMs under your sole control, or for apps needing direct HSM APIs (for example SSL offload or certain payment and signing uses).
3. Mid level questions
These questions check how you use the service in real projects. Interviewers expect the why, the how and one real example.
Q18. VPC peering or Transit Gateway: when does peering stop being enough? Mid level
| Point | VPC peering | Transit Gateway |
|---|---|---|
| Topology | One-to-one links, no transitive routing | Hub-and-spoke, transitive via route tables |
| Scale | Becomes a mesh: n(n-1)/2 links | Thousands of attachments |
| Cost | No hourly fee; data transfer only | Per attachment hour and per GB processed |
| Extras | Simple | Route domains, VPN and Direct Connect attachments, inter-Region peering |
Pick peering for a few VPCs that need high-bandwidth, low-cost links. Pick Transit Gateway once you have many VPCs, on-premises links or need segmented routing.
Q19. Transit Gateway or AWS Cloud WAN for a global network? Mid level
| Point | Transit Gateway | Cloud WAN |
|---|---|---|
| Scope | Regional hub; peer hubs across Regions yourself | Global network managed from one policy |
| Configuration | Route tables per TGW | Central network policy with segments |
| Best for | One or a few Regions | Many Regions and sites, global segmentation |
| Effort | Manual peering and routes between Regions | Policy-driven, automatic attachments by tags |
Pick Transit Gateway for single-Region or simple multi-Region setups. Pick Cloud WAN when a global company wants one policy-driven network across many Regions and branch sites.
Q20. Dedicated or hosted Direct Connect connection: what is the difference? Mid level
| Point | Dedicated connection | Hosted connection |
|---|---|---|
| Ordered from | AWS directly | An AWS Direct Connect Partner |
| Port speeds | Large fixed ports (such as 1, 10, 100, 400 Gbps) | Wide range including small speeds (from 50 Mbps) |
| Virtual interfaces | Several VIFs on the port | Usually one VIF per hosted connection |
| Physical work | Cross-connect at a Direct Connect location | Partner handles it |
Pick dedicated for large, enterprise links where you are at a Direct Connect location. Pick hosted for smaller bandwidth or when a partner network reaches your site.
Q21. Running dual-stack IPv4 and IPv6 or staying IPv4-only in a VPC: what changes? Mid level
| Point | IPv4 only | Dual-stack |
|---|---|---|
| Public addresses | Charged public IPv4 addresses, NAT for private egress | IPv6 addresses are globally unique; no NAT needed |
| Private egress | NAT gateway | Egress-only internet gateway for IPv6 (free of NAT processing) |
| Security | Security groups and NACLs for IPv4 | Separate IPv6 rules needed in SGs and NACLs |
| Compatibility | Everything | Some services and on-premises systems still IPv4-only |
Pick dual-stack for new VPCs and internet-facing apps to reduce IPv4 costs and prepare for growth; keep IPv4 where dependencies need it. Remember IPv6 rules, or you may expose services by accident.
Q22. Kinesis Data Streams or SQS for processing a stream of events? Mid level
| Point | Kinesis Data Streams | SQS |
|---|---|---|
| Ordering | Per shard (partition key) | FIFO queues per message group; standard has none |
| Consumers | Many independent consumers can read the same data | A message is processed by one consumer and deleted |
| Replay | Yes, within the retention period | No (once deleted, gone) |
| Scaling | Shards or on-demand mode | Automatic |
Pick Kinesis when several applications need the same ordered stream or you need replay (analytics, clickstreams). Pick SQS for work queues where each task is done once.
Q23. Amazon MSK or Kinesis Data Streams for streaming data? Mid level
| Point | Amazon MSK | Kinesis Data Streams |
|---|---|---|
| API | Apache Kafka (open-source clients, Kafka Connect, Streams) | AWS Kinesis API and SDKs |
| Ops | Choose brokers and storage (or MSK Serverless) | Serverless shards or on-demand |
| Portability | Kafka works anywhere | AWS only |
| Ecosystem | Huge Kafka ecosystem | Tight AWS integrations (Firehose, Lambda) |
Pick MSK if the team already uses Kafka or needs Kafka tools. Pick Kinesis for AWS-native streaming with minimal operations.
Q24. EventBridge Pipes or a Lambda function to connect a queue to a target? Mid level
| Point | Lambda glue code | EventBridge Pipes |
|---|---|---|
| Code | You write and maintain it | Configuration: source, filter, enrichment, target |
| Filtering | In code (you pay for every invocation) | Before processing, so unwanted events cost less |
| Enrichment | Any code | Lambda, Step Functions, API destinations or API Gateway |
| Use | Complex logic | Point-to-point integrations (SQS, Kinesis, DynamoDB Streams to targets) |
Pick Pipes for simple source-to-target flows with filtering and light enrichment. Pick Lambda when the transformation is complex or needs custom error handling.
Q25. AppSync or API Gateway for a mobile app backend? Mid level
| Point | API Gateway | AppSync |
|---|---|---|
| API style | REST, HTTP and WebSocket APIs | GraphQL (plus AppSync Events for pub/sub) |
| Data fetching | One endpoint per resource; client may call many | Client asks for exactly the fields it needs in one request |
| Real-time | WebSocket APIs you manage | Built-in subscriptions |
| Resolvers | Lambda, HTTP, AWS service integrations | Direct to DynamoDB, Aurora, Lambda, HTTP, OpenSearch |
Pick API Gateway for REST APIs and simple integrations. Pick AppSync when many screens need different shapes of data, or you want real-time updates without managing WebSocket connections.
Q26. Parameter Store or AWS AppConfig for feature flags? Mid level
| Point | Parameter Store | AppConfig |
|---|---|---|
| Purpose | Store values | Deploy configuration safely |
| Rollout | Instant change for every reader | Gradual deployment strategies (for example 10% every few minutes) |
| Safety | None built in | Validators, automatic rollback on CloudWatch alarms |
| Feature flags | Manual JSON | Built-in feature flag type with attributes |
Pick Parameter Store for static settings read at startup. Pick AppConfig for flags and settings that change in production and could break things if wrong.
Q27. CloudWatch Logs or OpenSearch Service for application logs? Mid level
| Point | CloudWatch Logs | OpenSearch Service |
|---|---|---|
| Setup | Built in, almost no setup | Cluster or serverless collection to design |
| Search | Logs Insights queries, filters | Full-text search, complex aggregations, dashboards |
| Cost at high volume | Ingestion and storage charges grow | Can be cheaper for heavy search use, but needs capacity planning |
| Retention | Per log group | Index lifecycle, UltraWarm and cold storage |
Pick CloudWatch Logs as the default. Add OpenSearch when many people search logs heavily, need rich dashboards, or run security analytics; you can subscribe log groups to OpenSearch.
Q28. CloudWatch Synthetics or CloudWatch RUM for monitoring a website? Mid level
| Point | Synthetics canaries | RUM |
|---|---|---|
| Traffic | Scripted fake users on a schedule | Real users' browsers |
| Detects | Outages and broken flows even at night | Real performance by country, browser and device, and JavaScript errors |
| Works with no users | Yes | No |
| Setup | Write canary scripts | Add a JavaScript snippet to the site |
Pick Synthetics to know the site works around the clock and to test key flows like login and checkout. Pick RUM to understand what real users experience. Most production sites use both.
Q29. IRSA or EKS Pod Identity for giving pods AWS permissions? Mid level
| Point | IRSA (IAM roles for service accounts) | EKS Pod Identity |
|---|---|---|
| Setup | OIDC provider per cluster; role trust policy per cluster | Pod Identity agent add-on; associations via EKS API |
| Trust policy | Mentions the cluster's OIDC issuer and service account | Trusts the pods.eks.amazonaws.com service principal; same role reusable across clusters |
| Session tags | Limited | Adds tags like cluster and namespace for ABAC |
| Works on | EKS and self-managed Kubernetes | EKS (check support for Fargate and other features) |
Pick Pod Identity for new EKS clusters because roles are easier to reuse. Keep IRSA where you already use it or need it outside EKS.
Q30. CloudWatch or Amazon Managed Service for Prometheus with Managed Grafana for container monitoring? Mid level
| Point | CloudWatch (Container Insights) | Managed Prometheus + Managed Grafana |
|---|---|---|
| Metrics model | CloudWatch metrics and logs | Prometheus metrics and PromQL |
| Setup | CloudWatch agent or add-on | Collectors (ADOT or managed scrapers) and Grafana workspaces |
| Strength | Native AWS alarms, one place for everything | Kubernetes-native ecosystem, existing dashboards and exporters |
| Cost model | Per metric, logs, alarms | Per samples ingested and queries, per Grafana user |
Pick CloudWatch for AWS-centric teams. Pick Prometheus and Grafana when the team already uses them or runs hybrid Kubernetes, and send alerts from both to the same on-call tool.
Q31. Control Tower or plain AWS Organizations for a growing company? Mid level
| Point | Organizations | Control Tower |
|---|---|---|
| What it gives | Accounts, OUs, SCPs, consolidated billing | A landing zone on top of Organizations: log archive and audit accounts, guardrails, account factory |
| Setup effort | You design and build everything | Guided setup with best practices |
| Flexibility | Full | Some opinions and managed resources you should not edit by hand |
Pick Control Tower when starting a multi-account setup and you want good defaults quickly. Pick plain Organizations (with your own automation) if you have a mature platform team and special requirements.
Q32. AWS Network Firewall or a Gateway Load Balancer with third-party appliances for traffic inspection? Mid level
| Point | Network Firewall | GWLB + appliances |
|---|---|---|
| Management | AWS managed, rules in AWS | You run vendor appliances (EC2) behind GWLB |
| Features | Stateful rules, Suricata-compatible IPS, domain filtering, TLS inspection | Vendor features your security team already knows |
| Licensing | Pay AWS per endpoint hour and GB | Instance costs plus vendor licences |
| Ops | Low | Patching and scaling appliances |
Pick Network Firewall for AWS-native inspection with low operations. Pick GWLB with appliances when policy requires a specific vendor or features Network Firewall lacks.
Q33. IAM users with access keys or IAM Identity Center for people who use the console and CLI? Mid level
| Point | IAM users | IAM Identity Center |
|---|---|---|
| Credentials | Passwords and long-term access keys per account | Single sign-on; short-lived credentials |
| Multi-account | A user in every account | One login, choose account and permission set |
| Identity source | Separate from company directory | Company directory (Entra ID, Okta, AD) or built-in |
| Offboarding | Delete users in every account | Disable once in the directory |
Pick Identity Center for all human access. Keep IAM users only for rare cases such as some legacy tools, and even then avoid long-term keys where possible.
Q46. VPC Lattice or PrivateLink and Transit Gateway for service-to-service traffic across many VPCs and accounts? Mid level
| Point | Transit Gateway / PrivateLink | VPC Lattice |
|---|---|---|
| Layer | Network (TGW) or one service endpoint (PrivateLink) | Application layer service network (HTTP, HTTPS, gRPC, and TCP) |
| Overlapping CIDRs | TGW cannot route them; PrivateLink can | Works across overlapping CIDRs |
| Auth | Security groups, endpoint policies | IAM auth policies per service, plus security groups |
| Routing | Routes and endpoints you manage | Path and header routing, weighted targets |
Pick Transit Gateway for broad network connectivity, PrivateLink to expose one service privately, and VPC Lattice for many microservices across accounts that need app-level routing and IAM-based auth.
Q47. AWS Firewall Manager or configuring WAF and security groups account by account? Mid level
| Point | Per-account setup | Firewall Manager |
|---|---|---|
| Scale | Fine for one or two accounts | Built for an organisation |
| New accounts and resources | Manual or custom automation | Policies applied automatically to new accounts and resources |
| Covers | Whatever you configure | WAF, Shield Advanced, security group, Network Firewall and DNS Firewall policies |
| Requirements | None | AWS Organizations and AWS Config |
Pick Firewall Manager when security must apply baseline rules to every account and catch new resources automatically. Per-account setup fits small environments.
4. Senior level and scenario questions
These questions check design thinking and troubleshooting. Think aloud. Say what you check first, what you change, and how you prevent it next time.
Q34. For a public API at 5,000 requests per second, API Gateway with Lambda or an ALB with ECS? Senior
| Point | API Gateway + Lambda | ALB + ECS (Fargate or EC2) |
|---|---|---|
| Built-in features | Throttling, usage plans, auth, request validation | Basic routing; add WAF, auth via OIDC or in app |
| Cost at steady high load | Per request charges for both services add up | Usually much lower per request |
| Latency | Small overhead plus possible cold starts | Steady, warm containers |
| Scaling | Automatic, watch concurrency quotas | Service auto scaling you tune |
Pick API Gateway + Lambda for spiky or moderate traffic and when API management features matter. Pick ALB + ECS for steady high traffic where cost per request and latency matter more.
Q35. AWS WAF on CloudFront or on the ALB? Senior
| Point | WAF on CloudFront | WAF on ALB |
|---|---|---|
| Where blocking happens | At the edge, before traffic reaches the Region | In the Region, at the load balancer |
| Protection | Also benefits from edge scale and Shield at the edge | Protects only that ALB |
| Visibility of client IP | Real client IP at the edge | Real client IP if no CDN in front; behind a CDN you need forwarded headers |
| Rules | Same rule types | Same rule types |
Pick CloudFront WAF for internet-facing apps with CloudFront in front. Use ALB WAF when there is no CDN, and make sure the ALB only accepts traffic from CloudFront when a CDN is used, or attackers can skip the edge rules.
Q36. One AWS account for everything or many accounts: how do you argue it in an interview? Senior
| Point | One account | Many accounts |
|---|---|---|
| Security boundary | One mistake can affect everything | Account is a hard boundary; blast radius is small |
| Quotas | Shared by all teams | Per account |
| Billing clarity | Needs strict tagging | Clear by account |
| Overhead | Low at first | Needs Organizations, landing zone, central logging and identity |
Pick many accounts (at least separate prod, non-prod, security and logging) for any real company. One account is fine only for learning or a tiny project.
Q37. Interface endpoints in every VPC or centralised in a shared services VPC? Senior
| Point | Endpoints per VPC | Centralised endpoints |
|---|---|---|
| Cost | Endpoint hours multiplied by VPCs | Fewer endpoints, but Transit Gateway data processing charges |
| DNS | Private DNS works automatically in each VPC | Needs Route 53 private hosted zones shared to spoke VPCs |
| Policies | Per VPC | Shared, harder to tailor per team |
| Failure domain | Local | Shared dependency |
Pick per-VPC endpoints for a few VPCs or high-volume traffic. Pick centralised endpoints for many VPCs with modest traffic, and calculate both endpoint hours and TGW data charges before deciding.
Q38. Route 53 weighted records or ALB weighted target groups for a blue/green switch? Senior
| Point | Route 53 weighted | ALB weighted target groups |
|---|---|---|
| Switch speed | Depends on DNS TTL and client caching | Immediate for new requests |
| Granularity | Per DNS answer, uneven with few clients | Per request |
| Scope | Can shift between Regions or different load balancers | Within one ALB |
| Rollback | Change weights, wait for TTL | Change weights instantly |
Pick ALB weighted target groups for blue/green inside one Region. Pick Route 53 weights when environments sit behind different load balancers or Regions, and keep TTLs low before the switch.
Q39. Self-hosted Jenkins on EC2 or CodePipeline with CodeBuild? Senior
| Point | Jenkins on EC2 | CodePipeline + CodeBuild |
|---|---|---|
| Ops | Patch Jenkins, plugins, agents, backups | Managed |
| Flexibility | Huge plugin ecosystem, any workflow | AWS-native steps, extendable with Lambda and custom actions |
| Security | Plugin vulnerabilities, stored credentials | IAM roles, no long-lived keys |
| Cost | Servers always on (unless agents scale) | Pay per pipeline and build minute |
Pick CodePipeline and CodeBuild (or GitHub Actions with OIDC) for new AWS projects. Keep Jenkins when heavy existing investment or special plugins justify the operations work, and run its agents on short-lived instances.
Q40. SNS to SQS fan-out or EventBridge to SQS for 15 consuming services? Senior
| Point | SNS + SQS | EventBridge + SQS |
|---|---|---|
| Throughput and latency | Very high throughput, low latency | High, slightly higher latency |
| Filtering | Filter policies on attributes or body | Rich patterns on any event field, prefix, numeric and more |
| Event sources | Your publishers | Your publishers, AWS services, SaaS partners |
| Extras | FIFO topics for ordered fan-out | Schema registry, archive and replay, cross-account buses |
Pick SNS + SQS for very high-volume, simple fan-out (including ordered with FIFO). Pick EventBridge when many teams publish and subscribe with different rules and you want replay and schema discovery.
Q41. Amazon Data Firehose straight to S3, or Kinesis Data Streams with a custom consumer, for clickstream analytics? Senior
| Point | Firehose to S3 | Data Streams + consumer |
|---|---|---|
| Code | None (optional Lambda transform) | Consumer app (Lambda, KCL, Flink) |
| Latency | Buffers by size and time (near real-time) | Real-time, milliseconds to seconds |
| Formats | Converts to Parquet, partitions by keys | Whatever your code does |
| Multiple consumers | One delivery path per stream | Many consumers on the same data |
Pick Firehose when the goal is landing data in S3 or Redshift for analytics. Add Data Streams when you also need real-time reactions (fraud alerts, live dashboards) from the same events.
Q42. For a hybrid network, Direct Connect with a VPN backup or two Direct Connect connections? Senior
| Point | DX + VPN backup | Two DX connections (different locations) |
|---|---|---|
| Resilience | Good: different paths (private link vs internet) | High: both private, separate devices and locations |
| Failover performance | Lower bandwidth and variable latency on backup | Similar performance after failover |
| Cost | Lower | Higher |
| Fit | Non-critical or moderate traffic | Critical production, large bandwidth |
Pick DX plus VPN for most medium workloads. Pick two (or four) DX connections across locations, following AWS resiliency recommendations, when downtime or a slow backup path is unacceptable. Test failover with BGP either way.
Q43. Store application secrets in environment variables, Secrets Manager at runtime, or the Parameters and Secrets Lambda extension? Senior
| Point | Environment variables | Secrets Manager API at runtime | Lambda extension (cached) |
|---|---|---|---|
| Exposure | Visible to anyone who can read the function or task configuration | Fetched only when needed | Fetched and cached locally |
| Rotation | Needs redeploy | Picks up rotated values | Picks up after cache TTL |
| Cost and latency | None | API call per fetch (cache it) | Fewer calls thanks to the cache |
Pick runtime fetching with caching (SDK cache or the extension) for secrets. Use environment variables only for non-secret settings, or for references (secret names), never for passwords.
Q44. Centralised logging account with S3 or a SIEM-style OpenSearch cluster for security logs? Senior
| Point | S3 log archive | OpenSearch for security analytics |
|---|---|---|
| Cost for years of data | Low (lifecycle to archive classes) | High if everything is kept hot |
| Query | Athena, Security Lake | Fast search, dashboards, alerting |
| Integrity | Object Lock, versioning | Index-level protections only |
| Use | Long-term evidence, compliance | Day-to-day investigation |
Pick both: S3 (optionally Amazon Security Lake in OCSF format) as the tamper-resistant store of record, and OpenSearch or a SIEM for the most recent weeks of searchable data.
Q45. For an internal web app, a VPN or AWS Verified Access? Senior
| Point | Client VPN | Verified Access |
|---|---|---|
| Access granted | Network-level access to a VPC | Per-application access, checked on every request |
| Checks | Who you are when connecting | Identity plus device posture, policy per app |
| User experience | Install and connect a VPN client | Open the app's URL in the browser (non-HTTP support depends on current features) |
| Lateral movement | Possible once connected | Limited to allowed apps |
Pick Verified Access for zero-trust access to internal web apps. Keep Client VPN for protocols and tools that need network-level access.
Q48. Route 53 failover records or AWS Global Accelerator for Regional failover of a web app? Senior
| Point | Route 53 failover | Global Accelerator |
|---|---|---|
| Mechanism | DNS answers change after health checks fail | Anycast static IPs; traffic shifts at the AWS edge |
| Failover speed | Depends on health check interval plus client DNS caching | Seconds, no DNS caching problem |
| Static IPs | No | Two static anycast IPs |
| Protocols | Any (DNS level) | TCP and UDP |
| Cost | Low | Hourly fee plus data transfer premium |
Pick Route 53 failover for most web apps with modest RTO needs. Pick Global Accelerator when clients cache DNS badly, need fixed IPs (firewall allow lists), or failover must be very fast.
Q49. On EKS, ALB through the AWS Load Balancer Controller or an NLB with an NGINX ingress controller? Senior
| Point | ALB via Load Balancer Controller | NLB + NGINX ingress |
|---|---|---|
| Where routing happens | In the AWS-managed ALB | In NGINX pods inside the cluster |
| Features | WAF, Cognito/OIDC auth, AWS certificates | NGINX features, custom configs, rewrites |
| Ops | No ingress pods to scale | You scale and patch the NGINX pods |
| Cost | One ALB per ingress group | One NLB plus pod resources |
Pick ALB for AWS-native features and less in-cluster work. Pick NGINX when you need its advanced routing or portable configuration across clouds.
Q50. DynamoDB Streams or Kinesis Data Streams for DynamoDB to feed change events? Senior
| Point | DynamoDB Streams | Kinesis Data Streams for DynamoDB |
|---|---|---|
| Retention | 24 hours | Configurable, up to much longer |
| Consumers | Limited number of simultaneous readers per shard | Many consumers, enhanced fan-out |
| Ordering and duplicates | Each change appears once, in order per item | Order and duplicates must be handled by consumers (use sequence or timestamps) |
| Integrations | Lambda, KCL adapter | Firehose, Flink, Lambda and other Kinesis tools |
Pick DynamoDB Streams for simple triggers like a Lambda per change. Pick Kinesis Data Streams when many consumers, longer retention or analytics pipelines need the change data.
5. Frequently asked questions
Which comparisons are asked most often?
Security groups vs NACLs, NAT gateway vs NAT instance, ALB vs NLB, SQS vs SNS, CloudWatch vs CloudTrail, VPN vs Direct Connect, and CloudFormation vs Terraform.
How should I end a comparison answer?
With a decision for a concrete case: "For our internal payroll app I would use X because ...". It shows judgement, not only memory.
Do I need to know every service on this page?
Freshers should know the networking and messaging basics. Senior candidates are expected to discuss Transit Gateway, Cloud WAN, Kinesis vs MSK, CloudHSM and multi-account security services.
6. Quick revision
- Security groups are stateful and attached to network interfaces; NACLs are stateless and attached to subnets.
- SQS queues work for one consumer group, SNS pushes to many subscribers, EventBridge routes events by rules.
- VPN is quick and encrypted over the internet; Direct Connect is a private, consistent link.
- CloudWatch is metrics and logs, CloudTrail is API activity, Config is resource configuration history.
- KMS holds keys, Secrets Manager holds rotating secrets, Parameter Store holds configuration.
7. Related chapters
- 1000 AWS Interview Questions and Answers for Freshers and Experienced (Complete Set)
- AWS VPC and Networking Interview Questions and Answers (50 Questions with Scenarios)
- Amazon SQS and SNS: Messaging Queues and Pub/Sub Explained
- AWS Monitoring Interview Questions and Answers: CloudWatch, CloudTrail, Config and Systems Manager (50 Questions)
This page is one part of the complete AWS interview question set. Open the full list here: All 2052 AWS interview questions.