Ravindra BagaleCourses & study guides Track your progress

AWS Cloud

AWS CloudWatch, CloudTrail and X-Ray Debugging Interview Questions Plus SQS, SNS, EventBridge, API Gateway and Systems Manager (50 Questions)

This page has 50 hands-on debugging questions on CloudWatch, CloudTrail and X-Ray, plus everyday core services: SQS, SNS, EventBridge, API Gateway and Systems Manager. The basics of these services are in Set 1. Here you learn to answer "how would you find out?" with real commands and output.

1. An everyday example: a hospital's monitors and records

Why do debugging questions matter?

When something breaks, the person who can quickly find the right metric, log line or trace saves the day. Interviewers ask these questions to see if you have really been on call.

Think of a hospital. CloudWatch metrics are the heart-rate monitors, logs are the nurse's notes, alarms are the beeping machines, CloudTrail is the visitor register at the gate (who came in and what they did), and X-Ray is the patient's journey through each department with time spent at each.

How to use this page

  • Run the read-only commands in a test account with a small app.
  • All names and IDs are examples, such as account 111122223333.
  • Some features (Logs Insights, CloudTrail Lake, data events) have extra cost; turn them off after practice.

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. How do you publish a custom metric to CloudWatch from the CLI? Fresher
aws cloudwatch put-metric-data --namespace Shop/Orders --metric-name OrdersPlaced --unit Count --value 12 --dimensions Env=prod,Channel=web

CloudWatch stores a data point of 12 for OrdersPlaced in the Shop/Orders namespace with two dimensions.

Points:

  • Each unique combination of name and dimensions is a separate metric (and is billed separately).
  • From applications, the embedded metric format in logs is usually cheaper and easier than many PutMetricData calls.
Q2. Why should latency alarms use p95 or p99 instead of the average? Fresher

The average hides slow requests. If 98 requests take 50 ms and 2 take 5 seconds, the average looks fine (about 150 ms), but 2% of users wait 5 seconds.

  • p95 means 95% of requests were faster than this value.
  • p99 shows the experience of the slowest 1%.
aws cloudwatch get-metric-statistics --namespace AWS/ApplicationELB --metric-name TargetResponseTime --dimensions Name=LoadBalancer,Value=app/shop-alb/0123456789abcdef --extended-statistics p99 --start-time 2026-11-20T04:00:00Z --end-time 2026-11-20T05:00:00Z --period 300

Use percentiles for user-facing alarms and SLOs.

Q3. How do you set a retention period on a log group? Fresher
aws logs put-retention-policy --log-group-name /aws/lambda/orders --retention-in-days 30

log events older than 30 days are deleted automatically.

By default, log groups keep data forever, which slowly increases cost. Set retention on every log group, and export or archive to S3 if you must keep logs longer for compliance.

Find log groups without retention:

aws logs describe-log-groups --query "logGroups[?retentionInDays==null].logGroupName" --output text
Q4. What is CloudWatch Logs Live Tail? Fresher

Live Tail shows log events from one or more log groups in real time, as they arrive, with optional filter terms.

aws logs start-live-tail --log-group-identifiers arn:aws:logs:ap-south-1:111122223333:log-group:/ecs/web --log-event-filter-pattern "ERROR"

You see new ERROR lines within seconds, which is useful while testing a deployment or reproducing a bug.

It is billed by session time, so stop it when you are done.

Q5. What is the Infrequent Access log class in CloudWatch Logs? Fresher

CloudWatch Logs has a Standard class and an Infrequent Access class.

  • Infrequent Access has a lower ingestion price.
  • It supports fewer features (for example no metric filters, subscription filters or Live Tail on those groups, though Logs Insights queries work; check current docs).
  • The class is chosen when the log group is created and cannot be changed later.

Use it for logs you keep for audits or rare investigations, such as debug or access logs that nobody alarms on.

Q6. How do you find who deleted a resource using CloudTrail from the CLI? Fresher
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=DeleteDBInstance --start-time 2026-11-19 --query "Events[].[EventTime,Username,Resources[0].ResourceName]" --output text

Output:

2026-11-19T22:14:03+05:30  ravi.ops  shop-db-test

user ravi.ops deleted shop-db-test at 22:14 IST.

lookup-events covers 90 days of management events in the current Region. For older history, or across Regions and accounts, query the trail's logs in S3 with Athena or use CloudTrail Lake.

Q7. Why can't CloudTrail tell you who deleted an object from an S3 bucket? Fresher

S3 object actions (GetObject, PutObject, DeleteObject) are data events. CloudTrail does not log data events by default; only management events (like CreateBucket or PutBucketPolicy) are logged.

To track object deletes, turn on data events for the bucket in a trail (or CloudTrail Lake), ideally with advanced event selectors for only write events on sensitive buckets to control cost.

S3 server access logs are another option for object-level access records.

Q8. What fields in a CloudTrail event do you read first? Fresher
  • eventTime and eventName: what happened and when (UTC).
  • userIdentity: who did it (type, ARN, session issuer for roles).
  • sourceIPAddress and userAgent: from where and with what tool (console, CLI, SDK, an AWS service).
  • awsRegion and recipientAccountId.
  • requestParameters and responseElements: what was changed.
  • errorCode and errorMessage: if it failed, for example AccessDenied.

These answer most "who changed this?" questions.

Q9. What is X-Ray's service map? Fresher

The service map (also shown in CloudWatch as the trace map) is a picture of your application built from traces. Each node is a service (API Gateway, a Lambda function, DynamoDB, an external API), and each line shows calls between them.

Colours and numbers show request rates, latency and errors on each node.

Use it to spot which dependency is slow or failing, for example "the payments API node is red with 8% faults".

Q10. You want to search X-Ray traces by order ID. Should the order ID go in an annotation or in metadata? Fresher
  • Annotations are simple key-value pairs that are indexed. You can search and filter traces by them, for example annotation.customer_tier = "gold".
  • Metadata can be any object (including large JSON), but it is not indexed or searchable.

Put a few important search fields (order ID, tenant, feature flag) in annotations, and extra debug detail in metadata.

Q11. How do you move messages from an SQS dead-letter queue back to the source queue? Fresher

Use a message move task (DLQ redrive):

aws sqs start-message-move-task --source-arn arn:aws:sqs:ap-south-1:111122223333:orders-dlq --destination-arn arn:aws:sqs:ap-south-1:111122223333:orders

Output:

{"TaskHandle": "eyJ0YXNr..."}

SQS moves messages from the DLQ back to the orders queue for another try.

Fix the bug first, or the messages will fail again and return to the DLQ. You can set a maximum move rate so consumers are not flooded.

Q12. How do you peek at messages in an SQS queue without losing them? Fresher
aws sqs receive-message --queue-url https://sqs.ap-south-1.amazonaws.com/111122223333/orders-dlq --max-number-of-messages 5 --visibility-timeout 30 --attribute-names ApproximateReceiveCount

You receive up to 5 messages; they become invisible to others for 30 seconds, then reappear because you did not delete them.

ApproximateReceiveCount shows how many times each message has been received, which helps you see poison messages. Be careful on live queues: while you hold them, consumers cannot process them.

Q13. How do you add a filter policy to an SNS subscription? Fresher
aws sns set-subscription-attributes --subscription-arn arn:aws:sns:ap-south-1:111122223333:orders:1a2b3c4d --attribute-name FilterPolicy --attribute-value '{"status":["SHIPPED"],"amount":[{"numeric":[">=",1000]}]}'

This subscriber only receives messages whose attributes have status SHIPPED and amount of at least 1000.

You can filter on message attributes or, with FilterPolicyScope set to MessageBody, on the JSON body. Filtering saves consumers from receiving and discarding unwanted messages.

Q14. How do you read values from SSM Parameter Store by path? Fresher
aws ssm get-parameters-by-path --path /prod/shop/ --recursive --with-decryption --query "Parameters[].[Name,Value]" --output text

Output:

/prod/shop/db/host      shop-db.cluster-abc123.ap-south-1.rds.amazonaws.com
/prod/shop/feature/new-checkout  true

All parameters under /prod/shop/ are returned, with SecureString values decrypted.

A clear hierarchy (env/app/key) lets you give each app permission to its own path only, using IAM resource ARNs like parameter/prod/shop/*.

Q15. How do you run a shell command on a group of instances with Systems Manager and see the output? Fresher
aws ssm send-command --document-name AWS-RunShellScript --targets Key=tag:Role,Values=web --parameters 'commands=["df -h /"]' --query Command.CommandId --output text

Output:

0a1b2c3d-1111-2222-3333-444455556666
aws ssm list-command-invocations --command-id 0a1b2c3d-1111-2222-3333-444455556666 --details --query "CommandInvocations[].[InstanceId,Status,CommandPlugins[0].Output]" --output text

Output:

i-0abc1234def567890  Success  /dev/nvme0n1p1  8.0G  7.6G  0.4G  95% /

The web server's root disk is 95% full. No SSH was needed, and the command is logged.

Q16. How do you turn on access logging for an API Gateway stage? Fresher

Access logs record one line per request, in a format you define, to CloudWatch Logs (or Firehose).

Example format:

Output:

{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","route":"$context.routeKey","status":"$context.status","latency":"$context.responseLatency"}

Every request is logged with its ID, client IP, route, status code and latency.

For REST APIs, execution logs (detailed internal steps) are separate and noisy; turn them on only while debugging. API Gateway needs a CloudWatch Logs role set at the account level for REST API logging.

Q17. What does CloudWatch alarm history tell you? Fresher
aws cloudwatch describe-alarm-history --alarm-name orders-5xx-high --history-item-type StateUpdate --max-items 3 --query "AlarmHistoryItems[].[Timestamp,HistorySummary]" --output text

Output:

2026-11-20T10:20:00Z  Alarm updated from ALARM to OK
2026-11-20T10:05:00Z  Alarm updated from OK to ALARM

The alarm was in ALARM for 15 minutes.

History shows when and why the state changed, and whether the actions (such as SNS notifications) ran. It helps when someone asks "why did I get paged?" or "why did the alarm not fire?".

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. How do you alarm on an error percentage instead of a raw error count? Mid level

Use metric math in the alarm: errors divided by requests, times 100.

Output:

m1 = HTTPCode_Target_5XX_Count (Sum), m2 = RequestCount (Sum)
e1 = 100 * m1 / m2   (alarm when e1 > 2 for 3 of 3 periods)

The alarm fires when more than 2% of requests fail, regardless of traffic volume.

A raw count alarm of "more than 50 errors" pages you at peak time for a normal rate and misses a real problem at night when traffic is low. Handle division by zero with FILL or IF expressions.

Q19. How do you get several metrics and a calculated value in one call? Mid level

Use get-metric-data:

aws cloudwatch get-metric-data --start-time 2026-11-20T04:00:00Z --end-time 2026-11-20T05:00:00Z --metric-data-queries file://queries.json

queries.json has items like m1 (Lambda Errors), m2 (Lambda Invocations) and e1 with Expression "100*m1/m2".

CloudWatch returns all series in one response, including the error rate, which is useful for scripts and dashboards.

It also supports Metrics Insights SQL-like queries, such as the top 10 functions by errors.

Q20. What is a high-resolution custom metric, and when is it worth it? Mid level

Normal custom metrics have 1-minute resolution. High-resolution metrics can be stored at 1-second resolution (StorageResolution 1), and alarms can evaluate every 10 or 30 seconds.

Worth it for: fast-moving signals where a minute is too slow, such as queue depth in a trading system or real-time game servers.

Cost: more PutMetricData calls and higher alarm prices. For most web apps, 1-minute data is enough.

Q21. How do you create a metric filter that counts a specific log line and alarm on it? Mid level
aws logs put-metric-filter --log-group-name /ecs/web --filter-name payment-failures --filter-pattern '{ $.level = "ERROR" && $.event = "payment_failed" }' --metric-transformations metricName=PaymentFailures,metricNamespace=Shop/App,metricValue=1,defaultValue=0

Then create an alarm on Shop/App PaymentFailures (for example Sum > 5 in 5 minutes).

Every JSON log line with level ERROR and event payment_failed adds 1 to the metric; with no matches, it records 0, so the alarm does not go to INSUFFICIENT_DATA.

Q22. How do you see metrics and logs from many accounts in one monitoring account? Mid level

Use CloudWatch cross-account observability:

  • Choose a monitoring account (a sink).
  • Link source accounts to it (with Observability Access Manager links, often deployed through Organizations or StackSets).
  • Choose what to share: metrics, logs, traces, Application Signals.

Then dashboards, alarms, Logs Insights queries and trace maps in the monitoring account can include data from all linked accounts, without copying the data.

Q23. How do you query CloudTrail Lake to find all IAM changes in the last week? Mid level

Output:

SELECT eventTime, eventName, userIdentity.arn, recipientAccountId
FROM <event-data-store-id>
WHERE eventSource = 'iam.amazonaws.com' AND readOnly = false
AND eventTime > '2026-11-13 00:00:00'
ORDER BY eventTime DESC

You get every write action on IAM across the accounts and Regions collected in the event data store.

CloudTrail Lake stores events in a managed data store and lets you run SQL without setting up Athena tables. It is billed by data ingested and scanned, so choose retention and selectors carefully.

Q24. A trail exists, but no new log files appear in the S3 bucket. What do you check? Mid level
aws cloudtrail get-trail-status --name org-trail --query "[IsLogging,LatestDeliveryError,LatestDeliveryTime]"

Output:

[true, "AccessDenied", "2026-11-18T09:00:00Z"]

CloudTrail is logging but cannot write to the bucket.

Common causes:

  • The bucket policy no longer allows cloudtrail.amazonaws.com to PutObject (often after someone replaced the policy).
  • The trail uses a KMS key whose key policy does not allow CloudTrail.
  • The bucket was deleted or the name changed.

Fix the policy, then watch LatestDeliveryTime update.

Q25. How does X-Ray sampling work, and why not trace every request? Mid level

Sampling decides which requests are traced. The default rule traces the first request each second and a small percentage (5%) of additional requests.

Why not trace everything: tracing every request costs more and adds overhead, and a sample is usually enough to see patterns.

Custom sampling rules can trace more for important routes (for example 100% of /checkout errors) or less for health checks.

For debugging one problem, temporarily raise the rate for that service or path.

Q26. How do you find the slowest downstream call in X-Ray traces? Mid level
  • Open the trace map and look for nodes with high latency.
  • Filter traces with an expression, for example service("orders") { responsetime > 2 }.
  • Open a slow trace and read its timeline: subsegments show each call (DynamoDB query, HTTP call to payments) with its duration.
  • Use analytics to compare slow and fast traces by annotations (such as region or customer tier).

Example finding: 80% of slow requests spend 1.8 seconds in a call to the tax service, so that is where to fix or add a timeout.

Q27. How do you pass a trace ID through SQS so the consumer's work joins the same trace? Mid level
  • Instrumented services add the X-Amzn-Trace-Id header to outgoing calls.
  • For SQS, the trace header is carried in the AWSTraceHeader message system attribute when the producer is instrumented.
  • Lambda consumers with active tracing link the SQS message to the original trace.
  • With OpenTelemetry, propagate trace context in message attributes and extract it in the consumer.

Also log the trace ID in every log line, so you can jump from a log line to the trace and back.

Q28. What does an EventBridge input transformer do? Mid level

An input transformer changes the event before it is sent to a target. You pick fields from the event (input paths) and build a new message (input template).

Output:

InputPathsMap: {"id": "$.detail.orderId", "st": "$.detail.status"}
InputTemplate: "\"Order <id> is now <st>\""

The target (for example an SNS topic for SMS) receives a short sentence instead of the full JSON event.

It saves writing a Lambda function just to reshape events.

Q29. What are EventBridge API destinations? Mid level

API destinations let EventBridge call any HTTPS endpoint (for example a SaaS webhook) as a rule target.

  • A connection stores the authentication (API key, basic auth or OAuth client credentials) in Secrets Manager for you.
  • You can set an invocation rate limit to protect the endpoint.
  • Retries and a dead-letter queue handle failures.

Example: send every "order shipped" event to a partner's webhook without writing or running any code.

Q30. An SQS FIFO queue processes messages very slowly even though there are many consumers. Why? Mid level

FIFO ordering is per message group. Messages with the same MessageGroupId are processed one at a time, in order. If all messages use one group ID, only one consumer can work at a time.

Fix:

  • Use more message groups, such as one per customer or order, so groups are processed in parallel while order is kept within each group.
  • Turn on high throughput mode for FIFO if you need more messages per second.
  • Check the visibility timeout and processing time per message.
Q31. How do you see whether SNS delivered a message to an HTTP or SMS endpoint? Mid level

Turn on delivery status logging for the protocol (HTTP/S, Lambda, SQS, Firehose, application push and SMS):

aws sns set-topic-attributes --topic-arn arn:aws:sns:ap-south-1:111122223333:orders --attribute-name HTTPSuccessFeedbackRoleArn --attribute-value arn:aws:iam::111122223333:role/sns-feedback

(and the matching failure role and sample rate attributes)

SNS writes success and failure records to CloudWatch Logs, including the response status from the endpoint.

Also watch NumberOfNotificationsFailed, and add a DLQ to subscriptions so failed messages are not lost.

Q32. When would you turn on API Gateway caching, and what are the risks? Mid level

API Gateway (REST APIs) can cache responses per stage, with a TTL, so repeated identical requests do not reach the backend.

Good for: read-heavy endpoints with data that can be a little stale, such as product lists.

Risks:

  • Users may see old data until the TTL expires.
  • Wrong cache keys can serve one user's data to another: include the right parameters and headers in the cache key, and never cache personal data without per-user keys.
  • The cache has an hourly price based on size.

For many cases, CloudFront in front of the API is a more flexible cache.

Q33. How do you check from the CLI which instances are missing patches, and what decides which patches count as missing? Mid level
  • Patch baselines define which patches are approved (for example security patches after 7 days).
  • Patch groups or patch policies (Quick Setup) target instances by tag.
  • Maintenance windows run AWS-RunPatchBaseline on a schedule, in batches, with concurrency and error limits.
  • Compliance reports show which instances are missing patches.
aws ssm describe-instance-patch-states --instance-ids i-0abc1234def567890 --query "InstancePatchStates[].[MissingCount,FailedCount,InstalledPendingRebootCount]"

Output:

[[3, 0, 1]]

3 patches are missing and one installed patch needs a reboot.

Q46. How do you turn on X-Ray tracing for a Lambda function and what does it show? Mid level
aws lambda update-function-configuration --function-name orders --tracing-config Mode=Active

Lambda sends trace segments for each sampled invocation, showing time spent in the Lambda service (including initialization on cold starts) and in your handler.

The function role needs permission to send traces (for example the AWSXRayDaemonWriteAccess managed policy). To see calls to DynamoDB or HTTP APIs inside the handler, add the X-Ray SDK or OpenTelemetry (ADOT) instrumentation, or use Powertools Tracer.

Q47. How do you test an EventBridge event pattern before you create the rule? Mid level
aws events test-event-pattern --event-pattern '{"source":["shop.orders"],"detail":{"status":["SHIPPED"]}}' --event file://sample-event.json

Output:

{"Result": true}

The sample event matches the pattern, so a rule with this pattern would send it to the targets.

Keep a few sample events (matching and not matching) in the repository and run this check in CI. It catches typos such as "Shipped" vs "SHIPPED" before they silently drop events.

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. An alarm should have fired during an outage but did not. How do you investigate? Senior
  • Check alarm history: was it ever in ALARM? If not, did data arrive at all?
  • Wrong metric: dimension mismatch, wrong namespace, or the resource was replaced and has a new ID.
  • Missing data treated as notBreaching while the service stopped sending metrics completely (a dead service sends no errors).
  • Statistic or period wrong: average instead of sum, or a 1-hour period that hides a 10-minute spike.
  • Datapoints to alarm too strict (for example 5 of 5).
  • Action problem: alarm fired but the SNS subscription was unconfirmed or the endpoint failed.

Fix and test alarms regularly by injecting a failure.

Q35. How would you detect that a scheduled job has silently stopped running? Senior

Absence of a signal is the problem, so alarm on missing success:

  • The job publishes a "JobSucceeded" metric (value 1) at the end of each run.
  • Create an alarm on that metric with Sum < 1 over the expected interval, and treat missing data as breaching.
  • Or use a heartbeat check: Synthetics canary or a "dead man's switch" style check that expects a ping.

Also alarm on job errors, but errors alone miss the case where the job never starts.

Q36. Logs show intermittent 5-second delays in an API. Metrics look normal. How do you use traces to find the cause? Senior
  • Filter traces by response time above 4 seconds and look at a few examples.
  • Compare their timelines: is the delay in the same subsegment every time (for example a DNS lookup, a TLS handshake to a third party, or a database connection open)?
  • Group slow traces by annotations: one AZ, one instance, one customer, one feature flag.
  • Common finding: a connection pool exhausted, so requests wait to get a connection; or retries with a 5-second timeout hidden inside an SDK call.

Fix the root cause and add a metric for that specific step so it shows on dashboards next time.

Q37. How do you design CloudTrail logging for 100 accounts so logs cannot be tampered with? Senior
  • An organisation trail created in the management account (or a delegated admin), logging all Regions and all member accounts.
  • Logs delivered to a bucket in a dedicated Log Archive account with SSE-KMS, versioning and S3 Object Lock (compliance mode for strict needs).
  • Log file integrity validation turned on.
  • SCPs that deny stopping or deleting trails and changing the bucket.
  • Data events only where needed (sensitive buckets, critical functions), using advanced selectors to control cost.
  • Alerts for changes to the trail, bucket policy or key policy.
Q38. SQS ApproximateAgeOfOldestMessage keeps rising, but the number of visible messages is small. What does that tell you? Senior

A small backlog with a growing oldest-message age usually means a few messages are stuck, not that consumers are too slow overall.

Common causes:

  • A poison message that fails every time and returns after the visibility timeout, with no DLQ (or a very high maxReceiveCount).
  • A FIFO message group blocked by one failing message, so the rest of that group waits.
  • Messages that are in flight for a long time because consumers extend visibility and hang.

Check ApproximateNumberOfMessagesNotVisible, consumer error logs and receive counts. Add a DLQ with a sensible maxReceiveCount and alarm on oldest-message age, which is usually the best SQS health alarm.

Q39. How do you prevent an EventBridge rule change from silently dropping events in production? Senior
  • Manage rules in IaC with review; test event patterns against sample events in the pipeline (test-event-pattern).
  • Monitor each rule: MatchedEvents, Invocations, FailedInvocations, and alarm if MatchedEvents drops to zero during business hours.
  • Add DLQs on targets and alarm on their depth.
  • Use an archive on the bus, so events can be replayed after a mistake.
  • Use schema registry or contract tests so producers do not change field names unexpectedly.
Q40. An API Gateway REST API returns 403 "Forbidden" for some users only. How do you debug it? Senior
  • Read the response body and headers: "Missing Authentication Token" usually means a wrong path or method, not an auth problem.
  • Check the authorizer: a Lambda authorizer may deny based on claims, or its cached policy (by token) may not cover the new route (a common bug when policies list only one method ARN).
  • Check resource policies (IP or VPC endpoint restrictions) and WAF rules on the stage.
  • Look at access logs with $context.authorizer.error and $context.error.message fields.
  • For private APIs, check the VPC endpoint and its policy.

Reproduce with the exact token and route, and fix the specific layer that denies.

Q41. How do you build a single dashboard that an on-call engineer can trust during incidents? Senior
  • Top row: user-facing signals (request rate, error rate, p99 latency) per service, with SLO lines.
  • Next: saturation (CPU, memory, connections, queue depth and age) and dependency health.
  • Recent deployments and alarm states shown as annotations or an alarm widget.
  • Links to runbooks, Logs Insights queries and trace maps.
  • Same layout for every service, built from code (CloudFormation or CDK) so it is consistent.

Keep it short: if everything is on the dashboard, nothing stands out.

Q42. How would you find out which IAM principal is making millions of API calls and causing throttling? Senior
  • CloudTrail Lake or Athena on CloudTrail logs: group by userIdentity.arn and eventName for the time window, sorted by count.

Output:

SELECT userIdentity.arn, eventName, COUNT(*) AS calls FROM <store> WHERE eventTime > '2026-11-20 09:00:00' GROUP BY 1,2 ORDER BY calls DESC LIMIT 10
  • CloudWatch usage metrics (AWS/Usage) show API call counts per service and operation.
  • CloudTrail Insights can flag unusual API call rates automatically.

Then fix the caller: cache results, use events instead of polling, add backoff.

Q43. How do you safely change a Parameter Store value that 50 services read at startup? Senior
  • Use versioned parameters and labels; deploy services that read a specific label (for example "prod-current") rather than the latest value.
  • Change the value, test with one service or a canary, then move the label.
  • Services that read only at startup need a rolling restart to pick up the change; plan it.
  • For runtime changes with validation and gradual rollout, use AWS AppConfig instead, which supports deployment strategies and automatic rollback on alarms.
  • Keep a record of who changed what (CloudTrail).
Q44. How do you prove that a performance problem started with a specific deployment, using only AWS observability tools? Senior
  • Mark deployments: CodeDeploy or pipeline events in EventBridge, or a custom metric or annotation at each release.
  • Compare p99 latency and error rate before and after the deployment time on the same graph, per instance or version (for Lambda, by version or alias; for ECS, by task definition revision).
  • In X-Ray or Application Signals, filter traces by version annotation and compare timelines for old and new versions.
  • Use Logs Insights to compare error counts by version field.

If the new version's numbers are worse and the old version (still running during a canary) stays healthy, you have strong evidence; roll back and investigate.

Q45. How do you use Systems Manager to collect logs from 200 instances during an incident without SSH? Senior
  • Run Command with a script that bundles the needed logs and uploads them to an S3 bucket (with an output location for command results).
  • Target by tag (for example Role=web), with a rate limit and error threshold so you do not overload anything.
  • Use Session Manager for interactive checks on a few instances, with session logging to S3 or CloudWatch.
  • For ongoing needs, install the CloudWatch agent through State Manager so logs are always shipped.

Everything is logged in CloudTrail, and no inbound ports are needed.

Q48. How do you set up an alarm that pages only when several signals agree, to reduce false alerts? Senior

Use a composite alarm with a rule such as:

Output:

ALARM("orders-5xx-rate") AND ALARM("orders-p99-latency") AND NOT ALARM("maintenance-window")

The team is paged only when errors and latency are both bad and no planned maintenance is running.

  • Keep the child alarms without actions (or with ticket-only actions).
  • Use action suppression on the composite alarm during known noisy events, such as deployments.
  • Review paging alarms monthly: every page should need human action.
Q49. A security team needs to know every time anyone uses the root user in any account. How do you build it? Senior
  • Organisation CloudTrail trail (all accounts and Regions).
  • An EventBridge rule in each account (or on a central bus that receives forwarded events) matching userIdentity.type "Root", for example on ConsoleLogin and any API call.
  • Target: an SNS topic or the security team's incident tool.
  • Also: root MFA everywhere, and with centralised root access management in Organizations you can remove root credentials from member accounts and use privileged tasks only when needed.

Test it with a harmless root console sign-in in a sandbox account, and confirm the alert arrives.

Q50. API Gateway latency is high, but the backend Lambda duration is low. How do you find where the time goes? Senior

Compare the API Gateway metrics:

  • Latency: total time from request received to response sent.
  • IntegrationLatency: time spent waiting on the backend.

If Latency is much higher than IntegrationLatency, the time is inside API Gateway: Lambda authorizer calls (check authorizer caching), request/response mapping templates, large payloads, or WAF.

If IntegrationLatency is much higher than the Lambda Duration, look at Lambda throttling or cold starts (Init Duration in logs), or network time to a private backend through a VPC link.

X-Ray tracing on the stage shows the split per request.

5. Frequently asked questions

Which is most important for interviews: metrics, logs or traces?

All three, but start with metrics and alarms (what is wrong), then logs (why), then traces (where in the chain).

Do I need to know query syntax?

Know basic Logs Insights commands (fields, filter, stats, sort) and a simple CloudTrail Lake SQL query. Interviewers mostly check that you know which tool answers which question.

What should I practise?

Publish a custom metric, alarm on a metric math expression, search CloudTrail for a deleted resource, trace a request with X-Ray, and redrive messages from a DLQ.

6. Quick revision

  • Use p95 or p99 latency, not average, for user-facing alarms.
  • aws cloudtrail lookup-events searches 90 days of management events in one Region.
  • Data events (S3 object level, Lambda invoke) are not logged unless you turn them on.
  • X-Ray annotations are indexed and searchable; metadata is not.
  • SQS start-message-move-task redrives messages from a DLQ back to the source queue.

This page is one part of the complete AWS interview question set. Open the full list here: All 2052 AWS interview questions.