mailwal

15 Advanced AWS DevOps Interview Questions That Can Make or Break Your TCS Interview πŸš€

Arvind Verma

15 Advanced AWS DevOps Interview Questions That Can Make or Break Your TCS Interview πŸš€

Part 2: Terraform, Docker, Kubernetes, Monitoring, Production Troubleshooting and AWS Architecture

In Part 1, we covered AWS fundamentals, CI/CD pipelines and Terraform basics. Now it is time to move beyond definitions and explore the scenarios that reveal how an engineer thinks under pressure.

Imagine this situation.

A production deployment has just completed. A few minutes later, Kubernetes Pods start restarting. Application errors increase, CloudWatch alarms trigger, and the team discovers that the latest Terraform changes were applied manually outside the pipeline.

Your interviewer asks: What would you investigate first?

You cannot solve this by memorising the definition of Kubernetes or Terraform. You need a systematic troubleshooting approach.

This article covers Questions 16–30 from the advanced interview series. Every question follows the same framework:

  • 🧠 Simple Concept

  • ❓ Why Do We Need It?

  • βš™οΈ How Does It Work?

  • 🏒 Production Example

  • πŸ’» Command / Configuration

  • 🚨 Common Interview Trap

  • 🎯 Candidate-Style Answer

  • 🧠 Memory Trick

These questions are useful for TCS and other AWS DevOps interviews, particularly when interviewers want to evaluate production thinking rather than textbook knowledge.


SECTION 1: Terraform, Docker and Kubernetes πŸ—οΈ

Question 16: How Do You Detect and Prevent Terraform Configuration Drift?

🧠 Simple Concept

Configuration drift occurs when the actual infrastructure differs from the infrastructure described in Terraform configuration.

For example, an engineer manually changes an AWS security group in the console, but the Terraform code remains unchanged.

The infrastructure and code now disagree.

❓ Why Do We Need It?

Drift can introduce security vulnerabilities, unexpected costs and inconsistent environments. It can also cause Terraform to propose changes that surprise the team during a later deployment.

βš™οΈ How Does It Work?

Terraform compares the desired configuration with its state and refreshes its view of managed infrastructure during planning.

A plan can reveal proposed changes resulting from detected differences. However, drift detection is not automatic continuous enforcement unless you configure scheduled or event-driven checks.

A prevention strategy includes:

  • Managing infrastructure through version-controlled Terraform.

  • Restricting manual changes through IAM permissions.

  • Running regular Terraform plans.

  • Reviewing AWS Config rules and CloudTrail events where appropriate.

  • Using remote state and a controlled CI/CD pipeline.

🏒 Production Example

An engineer manually opens port 22 to the internet on a production security group. During a scheduled Terraform plan, the team discovers the difference and investigates whether the change is authorised before restoring the intended configuration.

πŸ’» Command / Configuration

terraform init
terraform plan -refresh-only
terraform plan

The refresh-only plan helps identify state updates based on observed infrastructure. The regular plan shows proposed changes relative to configuration. Review the output carefully before applying anything.

🚨 Common Interview Trap

Do not automatically run terraform apply whenever drift appears. A manual change may represent an urgent production fix or an intentional configuration update that has not yet been committed to code.

🎯 Candidate-Style Answer

β€œI detect Terraform drift through regular plans, refresh checks and infrastructure monitoring. I restrict manual changes, review unexpected differences, update the source configuration when a change is intentional, and restore the desired configuration through a reviewed Terraform workflow.”

🧠 Memory Trick

Detect β†’ Investigate β†’ Reconcile β†’ Prevent.


Question 17: What Is the Difference Between a Deployment, StatefulSet and DaemonSet in Kubernetes?

🧠 Simple Concept

These Kubernetes workload controllers manage Pods differently.

  • Deployment: Manages stateless applications and supports rolling updates.

  • StatefulSet: Manages workloads that need stable identities and, when configured, stable persistent storage.

  • DaemonSet: Ensures that a Pod runs on each eligible node, according to its scheduling rules.

❓ Why Do We Need It?

Different workloads have different requirements. A web API does not usually need a stable Pod identity, while a distributed database or node-level logging agent may have specific identity or placement requirements.

βš™οΈ How Does It Work?

A Deployment manages ReplicaSets, which maintain the desired number of Pods.

A StatefulSet provides stable Pod identities and can associate Pods with persistent volume claims.

A DaemonSet manages Pods across eligible nodes, subject to selectors, tolerations and scheduling constraints.

🏒 Production Example

A company might use:

  • Deployment for a frontend application.

  • StatefulSet for a database that requires stable identities and persistent storage.

  • DaemonSet for a logging agent that collects node-level logs.

πŸ’» Command / Configuration

kubectl get deployments
kubectl get statefulsets
kubectl get daemonsets
kubectl get pods -o wide

Example DaemonSet fragment:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: log-agent
spec:
  selector:
    matchLabels:
      app: log-agent
  template:
    metadata:
      labels:
        app: log-agent
    spec:
      containers:
        - name: agent
          image: example/log-agent:1.0

The image is illustrative. Production manifests should use a trusted image and an appropriate security configuration.

🚨 Common Interview Trap

A StatefulSet does not automatically make an application highly available. The application must also handle replication, failure recovery and data consistency correctly.

🎯 Candidate-Style Answer

β€œI use Deployments for stateless workloads, StatefulSets for workloads requiring stable identities and potentially persistent storage, and DaemonSets for node-level services such as logging or monitoring agents. I select the controller according to the application’s operational requirements.”

🧠 Memory Trick

Deployment = Replicas. StatefulSet = Stable identity. DaemonSet = Eligible nodes.


Question 18: Explain Readiness, Liveness and Startup Probes.

🧠 Simple Concept

Kubernetes probes determine whether a container has started correctly, is ready to receive traffic, or needs to be restarted.

  • Readiness probe: Determines whether a Pod should receive traffic.

  • Liveness probe: Determines whether a container needs restarting.

  • Startup probe: Allows a slow-starting application time to initialise before liveness checks take over.

❓ Why Do We Need It?

A container can be running without being ready to serve requests. A process can also remain alive while being stuck in an unusable state.

Probes help Kubernetes distinguish these situations.

βš™οΈ How Does It Work?

Kubernetes periodically executes the configured checks.

A failed readiness probe removes the Pod from the set of ready endpoints for applicable Services. Repeated liveness failures can trigger a container restart. A startup probe delays liveness and readiness probing until startup succeeds, according to the configured settings.

🏒 Production Example

A Java application takes 90 seconds to load its configuration and warm up. Without a suitable startup probe, aggressive liveness checks might restart it repeatedly before initialisation completes.

πŸ’» Command / Configuration

startupProbe:
  httpGet:
    path: /health/startup
    port: 8080
  failureThreshold: 30
  periodSeconds: 5

readinessProbe:
  httpGet:
    path: /health/ready
    port: 8080
  periodSeconds: 10

livenessProbe:
  httpGet:
    path: /health/live
    port: 8080
  periodSeconds: 10

The endpoints must reflect the application’s actual health behaviour. A startup probe configured with the values above permits approximately 150 seconds of failed checks before the threshold is reached, subject to Kubernetes probe behaviour.

🚨 Common Interview Trap

Do not make liveness checks depend on every external service. If a database briefly becomes unavailable, a poorly designed liveness check can restart every application instance and make the outage worse.

🎯 Candidate-Style Answer

β€œI use readiness probes to control traffic, liveness probes to detect containers that need restarting, and startup probes for slow initialisation. I configure thresholds based on application behaviour to avoid premature restarts and unnecessary downtime.”

🧠 Memory Trick

Startup = Initialise. Readiness = Receive traffic. Liveness = Restart if stuck.


Question 19: A Kubernetes Pod Is in CrashLoopBackOff. How Do You Troubleshoot It?

🧠 Simple Concept

CrashLoopBackOff means a container repeatedly exits and Kubernetes is delaying subsequent restart attempts.

It describes a restart condition, not the root cause.

❓ Why Do We Need It?

The application may be crashing because of incorrect configuration, missing secrets, failed startup commands, resource limits or dependency problems.

Identifying the actual reason is more useful than repeatedly restarting the Pod.

βš™οΈ How Does It Work?

Use a structured investigation:

  1. Inspect Pod status and events.

  2. Review the current container logs.

  3. Check logs from the previous container instance.

  4. Inspect environment variables, ConfigMaps and Secrets references.

  5. Check resource limits and termination reasons.

  6. Verify dependencies and startup commands.

  7. Fix the cause and validate recovery.

🏒 Production Example

A newly deployed API starts and then exits because a required database environment variable is missing. The Pod repeatedly restarts.

The logs identify the configuration error, and the team corrects the deployment configuration rather than increasing CPU limits without evidence.

πŸ’» Command / Configuration

kubectl get pods
kubectl describe pod <pod-name>
kubectl logs <pod-name> --previous
kubectl logs <pod-name>
kubectl get events --sort-by=.metadata.creationTimestamp

For multi-container Pods, specify the container with -c <container-name>.

🚨 Common Interview Trap

Do not assume every CrashLoopBackOff is caused by insufficient memory. OOMKilled is one possible cause, but application exceptions and configuration failures are also common.

🎯 Candidate-Style Answer

β€œI start with kubectl describe pod and inspect the events and termination reason. Then I review current and previous logs, verify configuration and dependencies, and check for OOM kills or failed probes. After identifying the root cause, I apply a targeted fix and confirm that the Pod remains healthy.”

🧠 Memory Trick

Events β†’ Logs β†’ Configuration β†’ Resources β†’ Fix β†’ Verify.


Question 20: What Is the Difference Between ConfigMaps and Secrets?

🧠 Simple Concept

ConfigMaps store non-confidential configuration, while Secrets are intended for sensitive values such as passwords, tokens and certificates.

❓ Why Do We Need It?

Separating configuration from container images makes applications easier to configure across environments. Sensitive values also need stronger access controls and handling.

βš™οΈ How Does It Work?

A Pod can consume ConfigMaps and Secrets through environment variables or mounted volumes.

Kubernetes Secret data is base64-encoded in its common manifest representation. Base64 is not encryption. Appropriate RBAC, encryption at rest and secret-management practices are still required.

🏒 Production Example

An application uses a ConfigMap for a log level and a Secret for a database password. Access to the Secret is restricted to the workloads and operators that need it.

For AWS environments, teams may integrate with AWS Secrets Manager through an appropriate mechanism.

πŸ’» Command / Configuration

kubectl create configmap app-config \
  --from-literal=LOG_LEVEL=info

kubectl get configmap app-config
kubectl get secrets

Avoid printing Secret contents into terminals, logs or screenshots. Use a secure process for creating, distributing and rotating sensitive values.

🚨 Common Interview Trap

Do not claim that putting a password in a Kubernetes Secret automatically makes it secure. Permissions, encryption, delivery and rotation all matter.

🎯 Candidate-Style Answer

β€œI use ConfigMaps for non-sensitive configuration and Secrets for confidential values. I restrict access with RBAC, enable appropriate encryption at rest, avoid committing secrets to Git, and use a managed secret store where required.”

🧠 Memory Trick

ConfigMap = Configuration. Secret = Sensitive data with access controls.


Question 21: What Is Kubernetes Ingress?

🧠 Simple Concept

Ingress defines HTTP and HTTPS routing rules that expose services within a Kubernetes cluster.

An Ingress resource needs a compatible Ingress controller to implement those rules.

❓ Why Do We Need It?

Multiple services can share an external entry point while routing requests according to hostnames or URL paths.

βš™οΈ How Does It Work?

A client sends a request to an endpoint. The configured controller evaluates the Ingress rules and routes traffic to the appropriate Kubernetes Service.

On AWS, the AWS Load Balancer Controller can provision and manage an Application Load Balancer for supported Ingress configurations.

🏒 Production Example

A platform exposes three services:

  • /orders routes to the order service.

  • /payments routes to the payment service.

  • /catalog routes to the catalogue service.

The team can manage these routing rules centrally rather than creating a separate public endpoint for every service.

πŸ’» Command / Configuration

kubectl get ingress
kubectl describe ingress <ingress-name>
kubectl get services

Example Ingress rule:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: app-ingress
spec:
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /orders
            pathType: Prefix
            backend:
              service:
                name: orders-service
                port:
                  number: 80

This rule requires a compatible controller and a Service named orders-service with the specified port.

🚨 Common Interview Trap

Creating an Ingress resource alone does not guarantee that traffic will be routed. A compatible controller, DNS, network configuration and healthy backend endpoints are also required.

🎯 Candidate-Style Answer

β€œIngress defines HTTP and HTTPS routing rules for Kubernetes Services. I use a compatible controller, such as the AWS Load Balancer Controller on EKS, to implement the routing. I also validate DNS, load-balancer configuration, TLS and backend health.”

🧠 Memory Trick

Ingress = HTTP/HTTPS routing rules; controller = implementation.


SECTION 2: Monitoring, Logging and Production Troubleshooting πŸ“Š

Question 22: How Do You Monitor AWS Infrastructure?

🧠 Simple Concept

Infrastructure monitoring collects metrics, logs and events to help teams understand system health and detect failures.

❓ Why Do We Need It?

Without monitoring, teams may discover an outage only after users complain. Monitoring helps detect abnormal behaviour and provides evidence for troubleshooting.

βš™οΈ How Does It Work?

A monitoring strategy can combine:

  • Amazon CloudWatch metrics.

  • CloudWatch Logs.

  • CloudWatch alarms.

  • AWS CloudTrail for API activity auditing.

  • AWS X-Ray or other tracing tools where appropriate.

  • Prometheus and Grafana for application and platform observability.

🏒 Production Example

An EKS-based application experiences increased latency. The team checks application metrics, node and Pod health, load-balancer errors, CloudWatch logs and relevant infrastructure events to isolate the failing component.

πŸ’» Command / Configuration

List CloudWatch alarms:

aws cloudwatch describe-alarms

Inspect recent logs using the CloudWatch console or Logs Insights. On Kubernetes, begin with:

kubectl get nodes
kubectl get pods -A
kubectl get events -A

🚨 Common Interview Trap

Collecting metrics is not the same as having useful monitoring. Metrics need thresholds, context, dashboards, alert routing and a response process.

🎯 Candidate-Style Answer

β€œI combine metrics, logs and events to monitor infrastructure and applications. I define meaningful alarms, build dashboards around service health, and connect alerts to incident-response procedures. I also review alert quality to reduce noise and improve detection.”

🧠 Memory Trick

Metrics show what changed. Logs explain events. Alerts trigger action.


Question 23: Which Metrics Do You Monitor for an EC2 Instance?

🧠 Simple Concept

EC2 monitoring helps identify resource saturation, connectivity problems and application performance issues.

❓ Why Do We Need It?

An instance may be running while the application is slow because CPU, memory, disk or network resources are constrained.

βš™οΈ How Does It Work?

Useful metrics include:

  • CPU utilisation.

  • Network input and output.

  • Disk I/O and disk performance indicators.

  • Instance and application status checks.

  • Memory utilisation.

  • Filesystem utilisation.

  • Application response time and error rate.

Memory and filesystem utilisation generally require an installed and configured CloudWatch Agent or another monitoring agent; they are not available as standard EC2 metrics in the same way as basic CPU metrics.

🏒 Production Example

An API becomes slow during peak traffic. CPU utilisation remains normal, but the team finds high memory utilisation and frequent garbage collection. They investigate the application and JVM settings rather than scaling blindly.

πŸ’» Command / Configuration

List available CPU metric data:

aws cloudwatch get-metric-statistics \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=<instance-id> \
  --start-time <start-time> \
  --end-time <end-time> \
  --period 300 \
  --statistics Average

Replace the placeholders with valid timestamps and the target instance ID.

🚨 Common Interview Trap

Do not assume CloudWatch automatically collects every operating-system metric. Additional agents and permissions may be required.

🎯 Candidate-Style Answer

β€œI monitor CPU, network, status checks and storage performance, along with memory and filesystem metrics collected through an agent when needed. I correlate infrastructure metrics with application latency, error rates and logs to identify the real bottleneck.”

🧠 Memory Trick

CPU + Memory + Disk + Network + Health + Application.


Question 24: Explain CloudWatch Metrics, Logs and Alarms.

🧠 Simple Concept

Amazon CloudWatch provides several observability capabilities:

  • Metrics: Numerical measurements over time.

  • Logs: Records of events and application activity.

  • Alarms: Rules that evaluate metrics and can trigger configured actions.

❓ Why Do We Need It?

Metrics can reveal abnormal behaviour, logs provide detailed context, and alarms help teams respond before an issue grows.

βš™οΈ How Does It Work?

An application or AWS service publishes metrics and logs. Teams create dashboards and alarms around important indicators, such as high error rates or sustained CPU utilisation.

Alarms can trigger supported actions such as notifications through Amazon SNS.

🏒 Production Example

A service’s error rate increases after a release. CloudWatch metrics reveal the change, logs show repeated connection failures, and an alarm notifies the on-call team.

πŸ’» Command / Configuration

Inspect alarms:

aws cloudwatch describe-alarms

Example alarm design:

Metric: CPUUtilization
Condition: Above 80%
Evaluation: Sustained across multiple periods
Action: Notify the operations team

The threshold and evaluation period should reflect the workload. CPU alone is rarely sufficient to determine application health.

🚨 Common Interview Trap

An alarm is only useful if someone or something responds to it. Poor thresholds and excessive notifications create alert fatigue.

🎯 Candidate-Style Answer

β€œCloudWatch metrics show numerical trends, logs provide event-level details, and alarms detect conditions that require action. I configure meaningful thresholds, dashboards and notification paths, then review alerts against actual incidents to improve detection.”

🧠 Memory Trick

Metrics = Measure. Logs = Explain. Alarms = Act.


Question 25: How Do You Centralise Application Logs?

🧠 Simple Concept

Centralised logging collects logs from multiple applications, containers and servers into a shared platform.

❓ Why Do We Need It?

When a distributed application fails, useful evidence may be scattered across many Pods, EC2 instances and services. Centralised logging makes it easier to search across components and correlate events.

βš™οΈ How Does It Work?

A typical architecture includes:

  1. Applications emit structured logs.

  2. Agents or collectors gather logs.

  3. A processing layer parses and enriches records.

  4. Logs are sent to a central destination.

  5. Engineers search, visualise and alert on relevant events.

Common solutions include CloudWatch Logs, the ELK stack and OpenSearch-based logging architectures.

🏒 Production Example

An EKS application has frontend, payment and order services. A request fails during checkout. The team searches centralised logs using a correlation ID to trace the request across the services.

πŸ’» Command / Configuration

For Kubernetes:

kubectl logs deployment/my-app
kubectl logs <pod-name> --since=30m

For a production design, use a suitable log collector and central destination. Configure retention, access control, redaction of sensitive information and appropriate indexing.

🚨 Common Interview Trap

Centralising logs without retention, access controls or cost management can create a new security and operational problem.

Never log passwords, access tokens or other secrets unnecessarily.

🎯 Candidate-Style Answer

β€œI use structured application logs and a collector to send logs to a central platform. I standardise fields such as timestamp, service and correlation ID, configure retention and access controls, and use queries and dashboards to accelerate incident investigation.”

🧠 Memory Trick

Collect β†’ Parse β†’ Centralise β†’ Search β†’ Alert.


SECTION 3: Advanced Production Scenarios and AWS Architecture 🚨

Question 26: A Production Deployment Failed. What Steps Would You Take?

🧠 Simple Concept

A failed deployment requires controlled incident response, not random configuration changes.

❓ Why Do We Need It?

Unstructured troubleshooting can increase downtime, hide the original cause and introduce additional failures.

βš™οΈ How Does It Work?

Follow a structured approach:

  1. Stop or pause further rollout.

  2. Assess customer impact.

  3. Review deployment logs and application health.

  4. Identify the failing component.

  5. Roll back if that is the safest recovery option.

  6. Validate service recovery.

  7. Communicate with stakeholders.

  8. Investigate the root cause and prevent recurrence.

🏒 Production Example

A release introduces an incorrect database endpoint. The application starts returning errors, so the team pauses the rollout, restores the previous working configuration and verifies application health.

After recovery, the team adds a configuration-validation step to the pipeline.

πŸ’» Command / Configuration

For a Kubernetes Deployment:

kubectl rollout status deployment/my-app
kubectl describe deployment my-app
kubectl get events --sort-by=.metadata.creationTimestamp
kubectl rollout undo deployment/my-app

Run the rollback only after assessing the situation and confirming that the previous revision is suitable.

🚨 Common Interview Trap

Do not spend excessive time diagnosing a release while customer impact continues if a safe, known-good rollback is available.

At the same time, do not blindly roll back a change that includes an incompatible database migration without understanding the consequences.

🎯 Candidate-Style Answer

β€œI pause the rollout, assess impact and review deployment logs, health checks and application metrics. If the new release is responsible and rollback is safe, I restore the previous version and verify recovery. After stabilisation, I perform root-cause analysis and add preventive checks.”

🧠 Memory Trick

Stabilise first. Diagnose second. Prevent recurrence third.


Question 27: How Would You Reduce Deployment Downtime?

🧠 Simple Concept

Deployment strategies can reduce or eliminate planned application downtime when the architecture supports safe traffic shifting and backward compatibility.

❓ Why Do We Need It?

Users expect services to remain available during routine releases. A deployment that requires every application instance to stop before the new version starts can create avoidable interruptions.

βš™οΈ How Does It Work?

Possible approaches include:

  • Rolling updates.

  • Blue-green deployments.

  • Canary releases.

  • Load balancer health checks.

  • Readiness probes.

  • Automated smoke and integration tests.

  • Backward-compatible database migrations.

🏒 Production Example

An application runs multiple replicas behind a load balancer. Kubernetes gradually replaces old Pods while readiness checks ensure that only ready instances receive traffic.

The team monitors error rates and pauses the rollout if the new version becomes unhealthy.

πŸ’» Command / Configuration

Inspect rollout progress:

kubectl rollout status deployment/my-app
kubectl rollout history deployment/my-app

Example rolling-update configuration:

strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 1
    maxUnavailable: 0

This allows an additional Pod during rollout while aiming to keep the desired number of available replicas. Actual availability still depends on resource capacity, scheduling, readiness and application behaviour.

🚨 Common Interview Trap

Zero unavailable Pods does not guarantee zero downtime. Database migrations, session handling, overloaded dependencies and incompatible API changes can still disrupt users.

🎯 Candidate-Style Answer

β€œI reduce deployment downtime through rolling or blue-green deployments, appropriate health checks, automated verification and backward-compatible changes. I monitor error rates during rollout and maintain a tested rollback plan.”

🧠 Memory Trick

Deploy gradually. Verify health. Shift traffic safely.


Question 28: How Do You Design High Availability and Disaster Recovery in AWS?

🧠 Simple Concept

High availability (HA) keeps a service operating despite certain component failures. Disaster recovery (DR) restores service after a larger disruption, such as a regional outage.

❓ Why Do We Need It?

A single instance, Availability Zone or Region can become unavailable. The architecture must match the business’s recovery requirements.

βš™οΈ How Does It Work?

High-availability techniques can include:

  • Multiple Availability Zones.

  • Load balancing.

  • Auto Scaling.

  • Database replication and automated backups.

  • Health checks and automated failover.

Disaster-recovery strategies may include backup and restore, pilot light, warm standby or multi-site deployment.

Two critical measures are:

  • RTO: How long recovery can take.

  • RPO: How much data loss, measured in time, the business can tolerate.

🏒 Production Example

A customer-facing application runs across multiple Availability Zones. The organisation maintains cross-Region backups and documents the process for restoring critical services in a secondary Region.

The recovery process is tested regularly rather than assumed to work because the backup jobs succeeded.

πŸ’» Command / Configuration

Inspect EC2 placement:

aws ec2 describe-instances \
  --query 'Reservations[].Instances[].{ID:InstanceId,AZ:Placement.AvailabilityZone,State:State.Name}'

For a real DR design, also verify database recovery procedures, infrastructure-as-code readiness, DNS changes, secrets, quotas and application dependencies.

🚨 Common Interview Trap

Multi-AZ is not the same as multi-Region disaster recovery. High availability within a Region does not automatically protect against every regional failure.

🎯 Candidate-Style Answer

β€œI design HA and DR based on business RTO and RPO requirements. I use multi-AZ architecture for resilience within a Region and select an appropriate cross-Region recovery strategy based on cost and recovery objectives. I also test restoration and failover procedures.”

🧠 Memory Trick

HA = Keep running. DR = Recover after disruption. RTO = Time. RPO = Data loss.


Question 29: How Would You Optimise AWS Costs?

🧠 Simple Concept

Cloud cost optimisation means reducing unnecessary spending without compromising required reliability, security or performance.

❓ Why Do We Need It?

Overprovisioned instances, idle resources, excessive log retention and inefficient storage can quietly increase the cloud bill.

βš™οΈ How Does It Work?

A practical process includes:

  1. Review AWS Cost Explorer and billing reports.

  2. Apply cost allocation tags.

  3. Identify idle and underutilised resources.

  4. Right-size compute and storage.

  5. Use appropriate Auto Scaling.

  6. Evaluate Savings Plans or Reserved Instances where suitable.

  7. Configure S3 lifecycle policies.

  8. Review data-transfer costs.

  9. Set budgets and alerts.

  10. Recheck performance after optimisation.

🏒 Production Example

A development environment runs large EC2 instances overnight despite having no active users. The team schedules shutdowns where appropriate, reviews instance sizing and checks that required development workflows remain available.

πŸ’» Command / Configuration

Inspect EC2 instance types:

aws ec2 describe-instances \
  --query 'Reservations[].Instances[].{ID:InstanceId,Type:InstanceType,State:State.Name}'

Use Cost Explorer and billing data for actual cost analysis. Instance type and running state alone do not establish whether a resource is wasteful.

🚨 Common Interview Trap

Choosing the cheapest instance is not automatically cost optimisation. Poor performance can increase retries, latency, operational effort and customer impact.

🎯 Candidate-Style Answer

β€œI start with cost and usage data, identify idle or underutilised resources, and review right-sizing, scheduling, storage lifecycle and scaling policies. I evaluate commitment-based discounts against actual usage patterns and verify that cost reductions do not harm reliability or performance.”

🧠 Memory Trick

Measure β†’ Right-size β†’ Automate β†’ Review.


Question 30: Describe a Challenging Production Incident You Resolved.

🧠 Simple Concept

Behavioural and incident-based questions evaluate how you investigate problems, communicate under pressure and prevent recurrence.

The interviewer wants to understand your reasoning, not just the final command.

❓ Why Do We Need It?

Production engineering involves incomplete information, competing priorities and decisions that can affect customers.

A good incident story demonstrates ownership, evidence-based troubleshooting and learning.

βš™οΈ How Does It Work?

Use the STAR structure:

  • Situation: Describe the incident and its impact.

  • Task: Explain your responsibility.

  • Action: Describe the evidence you collected and the decisions you made.

  • Result: Explain the verified outcome and preventive improvements.

🏒 Production Example

Consider this illustrative scenario: a Kubernetes release causes Pods to enter CrashLoopBackOff. You inspect the previous container logs and discover that a required environment variable is missing.

You restore the last known-good release, validate service recovery and add a configuration check to the CI/CD pipeline.

When discussing your own experience, replace this scenario with a real incident you personally worked on. Never claim an illustrative example as your actual production experience.

πŸ’» Command / Configuration

kubectl describe pod <pod-name>
kubectl logs <pod-name> --previous
kubectl get events -A

The exact investigation depends on the incident. Use commands that gather evidence before making changes.

🚨 Common Interview Trap

Do not describe an incident by saying only, β€œI restarted the server and fixed it.”

Explain how you identified the root cause, reduced impact, verified recovery and prevented recurrence.

🎯 Candidate-Style Answer

β€œIn a production incident, I first assess customer impact and stabilise the service. I gather evidence from logs, metrics, events and recent changes, then isolate the failing component. After applying and validating the fix, I document the root cause and implement preventive improvements. I use a real incident and measurable outcomes when describing my own experience.”

🧠 Memory Trick

STAR + Evidence + Prevention.


Final Interview Preparation Checklist 🎯

Before your next AWS DevOps interview, practise answering these questions aloud.

  • πŸ—οΈ Terraform: Explain drift detection and safe infrastructure changes.

  • ☸️ Kubernetes: Distinguish workload controllers, probes, configuration and troubleshooting.

  • πŸ“Š Monitoring: Connect metrics, logs, alarms and incident response.

  • 🚨 Production scenarios: Explain how you stabilise services, roll back safely and validate recovery.

  • 🌍 AWS architecture: Discuss high availability, disaster recovery and cost optimisation.

  • 🎯 Behavioural questions: Use real examples, explain your decisions and describe what you improved.

For every question, practise all eight attributes: concept, purpose, workflow, production example, command or configuration, interview trap, candidate-style answer and memory trick.

Conclusion

Advanced AWS DevOps interviews test whether you can connect tools and concepts into a reliable operating model.

A strong engineer knows how to detect a problem, collect evidence, choose a safe response, verify the outcome and improve the system afterwards.

Think like an engineer, not a memoriser. Learn the concepts, practise the scenarios and explain your decisions clearly. πŸš€

Hashtags

#AWS #AWSDevOps #DevOpsEngineer #TCSInterview #AdvancedDevOps #Kubernetes #Docker #Terraform #CloudWatch #Monitoring #Logging #CICD #ProductionSupport #HighAvailability #DisasterRecovery #CostOptimization #SRE #CloudComputing

Follow Me

If you enjoyed this article and would like more practical DevOps, Cloud, Kubernetes, AWS, Terraform, CI/CD and Software Engineering content, feel free to connect with me on LinkedIn.

LinkedIn: https://www.linkedin.com/in/arvindverma021/

Arvind Verma is free today. But if you enjoyed this post, you can tell Arvind Verma that their writing is valuable by pledging a future subscription. You won't be charged unless they enable payments.

Pledge your support

Β© 2026 Arvind Verma
548 Market Street PMB 72296, San Francisco, CA 94104