Amazon Java Developer Interview Questions & Answers

amazon icon

Questions with Detailed ExplanationsWith Detailed Explanations

(Last Updated: August 28, 2026)

21. How would you design the Unix File Search API?API DesignMediumAmazon

Question Details

Design a Unix file search API that supports multiple search arguments such as extension, name, and size, and stays maintainable as new constraints are added.

Short Interview Answer (30-60 seconds)

At a high level, I would design a small Java file-search API that separates directory traversal from filtering. The client calls FileSearchAPI with a root path and Filter criteria. SearchService coordinates the work, while FileSystemWalker traverses the Unix file system and returns file entries plus metadata. ExtensionFilter, NameFilter, and SizeFilter handle individual rules, and AndFilter, OrFilter, and NotFilter combine them. Matching entries become a List<FileEntry> and return through FileSearchAPI. The trade-off is more small classes, but new constraints stay easy to add.

Detailed Explanation

This question asks us to build a simple way to find files under a chosen folder. The caller may want files with a certain ending, name, or size. The hard part is keeping the design easy to change when new search rules appear. We also need to walk folders safely and return only matching files. The diagram solves this by separating the public API, search coordination, folder walking, file information, filters, filter combinations, and result collection. I would explain the design in that same order.

Useful Questions to Ask the Interviewer
  • Should searches always include subdirectories, or should recursion be configurable?
  • What should happen when a directory cannot be read because of permissions?
  • What symlink behavior and maximum traversal depth should we use?
How would you design the Unix File Search API? diagram
How to Explain It in an Interview
1. Start with the public API

I would begin with FileSearchAPI because it is the public entry point. The client calls search(rootPath, criteria). The diagram shows example criteria such as extension=.java, a name containing "Service", and size > 10 KB. The public contract returns List<FileEntry>. This keeps callers independent from the internal traversal and filtering classes.

2. Let SearchService coordinate the search

FileSearchAPI passes the work to SearchService. SearchService orchestrates traversal and filtering. It asks FileSystemWalker to traverse the requested root path. It also applies the supplied Filter criteria and collects matching entries. This keeps the high-level search flow in one place while lower-level responsibilities stay separate.

3. Walk the Unix directory tree

SearchService calls FileSystemWalker with traverse(rootPath). FileSystemWalker recursively walks the Unix directory tree and reads directories and files from the Unix File System. The file system returns file entries plus metadata. The walker owns traversal concerns such as recursion, maximum depth, permission-denied handling, and symlink policy. These rules decide which paths can be visited before filtering happens.

4. Represent discovered items as FileEntry metadata

The design represents each discovered item as FileEntry or FileMetadata. The diagram shows path, name, extension, size, isDirectory, and optional lastModified. Filters read these values instead of accessing the file system themselves. That makes the matching logic easier to test and keeps file-system access separate from search rules.

5. Use one Filter contract for every rule

The Filter interface exposes boolean matches(FileEntry file). ExtensionFilter checks the extension. NameFilter checks whether the file name contains a value or matches a pattern. SizeFilter checks file size. SearchService applies the criteria to FileEntry metadata. Because all rules share one interface, SearchService does not need a growing chain of special-case conditionals.

6. Combine rules with composite filters

For multiple conditions, I would build a Filter tree. AndFilter matches only when all child filters match. OrFilter matches when any child matches. NotFilter negates one child filter. This supports combinations such as extension is .java AND name contains Service AND size is above 10 KB. The key maintainability choice is the Open/Closed Principle: a new constraint is added by implementing Filter rather than rewriting the stable search orchestration.

7. Collect and return matching files

When entries satisfy the composed criteria, SearchService collects them in SearchResult, shown as List<FileEntry>. SearchResult holds the matched file entries and returns the collected list upward to FileSearchAPI. FileSearchAPI then returns the List<FileEntry> result to the client. The main trade-off is extra small classes and a filter tree. In return, traversal, metadata, filtering, and result handling remain easier to change independently.

Practical Complexity & Trade-offs

The main design choice is separating directory walking from filter rules. The benefit is that FileSystemWalker can focus on recursion, depth limits, permission failures, and symlink policy. Filter classes focus only on matching FileEntry metadata. Composite filters add more objects, but they make AND, OR, and NOT combinations easy to build. The Open/Closed approach also means a new constraint usually needs a new Filter implementation instead of changes to SearchService. The downside is more classes than a single method with many if statements. Search time can still grow with the number of files and directories visited. We accept that cost because the design stays understandable, testable, and maintainable as search requirements grow.

Why Interviewers Ask This

Interviewers use this question to test whether a candidate can turn changing requirements into clean interfaces and responsibilities. They want to see correct separation between traversal, file metadata, filtering, orchestration, and result collection. They also look for a design that supports multiple conditions without one large conditional method. A strong answer explains extensibility, composite rules, traversal edge cases, response flow, and the trade-off between extra small classes and easier long-term maintenance.

Interviewer may ask next
How would the design handle a very deep directory tree with permission errors or symbolic links?

I would keep those concerns inside FileSystemWalker because that component owns traversal. The existing traverse(rootPath) flow stays the same, but the walker applies the configured maximum depth, permission-denied behavior, and symlink policy before deciding which paths to continue visiting. If a directory cannot be read, the walker should handle it according to the chosen policy rather than moving that decision into SearchService or a Filter. Symlinks also need an explicit policy so traversal does not unexpectedly follow paths or create cycles. FileEntry creation and Filter evaluation stay unchanged for entries that are successfully discovered. SearchService still applies the same composed Filter tree and collects matches in SearchResult. The benefit is clear ownership of traversal failures and limits. The downside is more edge-case logic inside FileSystemWalker, so those policies need careful tests.

How would you add a new search constraint, such as last-modified time, without changing the existing search flow?

I would add another implementation of the existing Filter interface. For example, LastModifiedFilter could inspect the optional lastModified value already shown in FileEntry or FileMetadata. It would implement the same boolean matches(FileEntry file) contract used by ExtensionFilter, NameFilter, and SizeFilter. SearchService would not need a new branch for the rule. The new filter could also participate in the existing AndFilter, OrFilter, and NotFilter tree, so callers could combine time with extension, name, and size conditions. FileSystemWalker would continue traversing the Unix file system and producing file metadata as before. SearchResult would continue collecting matching entries. This follows the Open/Closed Principle shown in the diagram: extend behavior by adding a Filter implementation instead of modifying stable orchestration code. The downside is that the number of small Filter classes grows as more constraints are introduced.

22. How would you design the search aggregator service API?API DesignMediumAmazon

Question Details

Design an API for a search aggregator that can route a keyword to the right underlying search service and minimize the number of service calls.

Short Interview Answer (30-60 seconds)

At a high level, I would expose one search API that chooses the best underlying search service instead of calling every service. The client sends HTTPS GET /search?q=keyword&limit=10. The request is validated and normalized, then checked in the Result Cache. On a cache miss, the Query Router uses routing rules, service health, and latency to choose one provider. A second provider is used only for an empty result, timeout, or low confidence. This reduces fan-out and latency, but it makes accurate routing decisions more important.

Detailed Explanation

We need one simple way for a caller to search across several different search systems. The caller should not decide whether a keyword belongs to product, document, or web search. The service should make that choice. It should also avoid asking every search system for every request because that creates extra work and longer waits. Repeated searches should reuse saved results when possible. If the first chosen service cannot give a useful answer, one backup may be tried. The explanation below follows the exact cache, routing, provider, fallback, response, and logging design in the diagram.

Useful Questions to Ask the Interviewer
  • How should we decide which search service is best for a keyword?
  • How fresh must results in the Result Cache be?
  • When should an empty result or low confidence trigger the secondary service?
How would you design the search aggregator service API? diagram
How to Explain It in an Interview
1. Start with the Search API

I would begin with one public entry point. The Client / Caller sends HTTPS GET /search?q=keyword&limit=10 to the Search API. This hides the External Search Services from the caller. The caller does not need to know whether Product Search Service, Document Search Service, or Web Search Service should handle the keyword. The Search API later returns the aggregated search response. It also sends an asynchronous request log to Query Logs + Metrics. That logging flow is separate from the business response path.

2. Validate, normalize, and check the Result Cache

The Search API forwards the request to Request Validation + Query Normalization. This component checks the search input and puts the query into a consistent form. The flow then performs a cache lookup in the Result Cache. If matching cached results exist, they can go directly toward Response Formatter. This lets repeat queries avoid provider calls. If the cache does not contain the result, the cache-miss path continues to Query Router.

3. Choose the best target service

On a cache miss, Query Router decides which provider should receive the query. It consults Routing Rules + Service Metadata. The router loads routing rules together with service health and latency information. Routing Rules + Service Metadata provides the best target service back to Query Router. The key decision is to choose one best service first. The design does not fan out every request to all search services. Query Router then sends the selected provider toward Provider Adapters. This reduces unnecessary calls and usually lowers latency.

4. Call the primary provider and use fallback only when needed

Provider Adapters handle communication with the chosen External Search Service. The primary search request is sent to the selected provider, shown as Product Search Service in the main path. Its search response is consumed by Provider Adapters. The design also has a limited fallback path. A secondary request is made only when needed, such as when the first call times out, returns an empty result, or has low confidence. The diagram shows Document Search Service as the secondary example. Its fallback response returns to Provider Adapters. Web Search Service is also shown as another underlying search option. The important rule is that the service does not call every provider by default.

5. Format, cache, and return the result

Provider Adapters send the normalized provider result to Response Formatter. Response Formatter creates the common JSON response shown in the diagram: {results, source, traceId}. It also stores the result in Result Cache with a TTL. TTL means the cached value expires after a limited amount of time. The JSON response then returns to Search API. Search API sends the aggregated search response back to Client / Caller. A cache hit follows the shorter path and avoids Query Router, Provider Adapters, and the external provider call.

6. Record routing and latency information

Query Logs + Metrics receives asynchronous operational information. Search API sends the request log there. The routing path also records routing and latency metrics. These measurements help show which services are selected and how providers are performing. They support operating and tuning the routing behavior without becoming part of the synchronous response path. The main trade-off is added routing logic. A simple fan-out design is easier to reason about, but it creates more service calls. This design accepts more routing complexity to reduce provider traffic and latency.

Practical Complexity & Trade-offs

The main choice is to call one search service first instead of calling all of them. The benefit is fewer service calls, lower latency, and less load on the External Search Services. The downside is that Query Router must choose well using routing rules, health, and latency. Result Cache also saves work because repeated queries can avoid provider calls. Its downside is freshness, so results use a TTL. The fallback path improves reliability when the first provider times out, returns an empty result, or has low confidence. The downside is that fallback adds another call and makes that request slower. We accept that extra cost only when the primary provider does not produce a useful result.

Why Interviewers Ask This

Interviewers use this question to test whether you can put one clean API in front of several backend search services. They are looking for correct request and response flow, validation, caching, routing, fallback behavior, and clear ownership. They also want to see whether you understand the cost of calling every provider. A strong answer explains why selecting one provider reduces fan-out, when a secondary call is justified, and why logs and metrics should stay outside the synchronous business response path.

Interviewer may ask next
What would you change if the primary search service often times out?

I would keep the same design, but I would rely more heavily on the existing health and latency information used by Query Router. The client would still call HTTPS GET /search?q=keyword&limit=10, and the request would still pass through Request Validation + Query Normalization and Result Cache. On a cache miss, Query Router would consult Routing Rules + Service Metadata before choosing the best target service. A provider showing poor health or high latency should be less likely to become the primary target. If the selected provider still times out, the existing fallback path allows Provider Adapters to make one secondary request. The fallback response then follows the same normalized-result path through Response Formatter and Search API. Query Logs + Metrics continues receiving asynchronous routing and latency information. The main downside is that routing becomes more dependent on changing health signals. Poor or stale signals could select the wrong provider. I would still avoid calling every service because that would increase fan-out and latency for every request.

How would the design handle many repeated searches for the same keyword?

I would use the existing Result Cache because it is placed before Query Router and the external provider calls. The public API does not change. Client / Caller still sends HTTPS GET /search?q=keyword&limit=10 to Search API, and the request still goes through Request Validation + Query Normalization. The service then performs the cache lookup. On a cache hit, cached results can go directly to Response Formatter and return as the common {results, source, traceId} response through Search API. That path skips Query Router, Provider Adapters, and External Search Services, so repeat queries avoid provider calls. After a cache miss is served by a provider, Response Formatter stores the result in Result Cache with a TTL. The main downside is freshness. A longer TTL avoids more provider calls but can keep older search results longer. A shorter TTL improves freshness but produces more cache misses and more external traffic. I would choose the TTL based on how quickly the underlying search results change.

23. How would you design the APIs for a product reviews feature?API DesignMediumAmazon

Question Details

Design the request URLs and payload structure for a product reviews feature, including duplicate prevention and user identity handling.

Short Interview Answer (30-60 seconds)

At a high level, I would make product reviews a small resource-focused API. The client signs in through the Identity Service and sends a JWT with each protected request. Creating a review uses POST /v1/products/{productId}/reviews, while listing reviews uses GET on the same product resource. The API derives the reviewer identity from JWT.sub instead of trusting a userId from the body. It checks the product, validates the request, and stores the review. A unique product-and-user rule prevents duplicates. The trade-off is extra validation and database coordination for stronger correctness.

Detailed Explanation

This question asks us to design a simple way for customers to create and read product reviews. We need clear addresses for each action and clear rules for what information the customer sends. We also need to stop the same customer from creating duplicate reviews for one product. Another important goal is making sure customers cannot pretend to be another user. I will follow the diagram from sign-in, through review creation and reading, to database storage, errors, and logging.

Useful Questions to Ask the Interviewer
  • Can one user have only one active review for each product?
  • Should users be allowed to edit and delete their own reviews?
  • Do we need average rating and total review count in the list response?
How would you design the APIs for a product reviews feature? diagram
How to Explain It in an Interview
1. Start with identity and the API boundary

I would first establish who the user is. The Web / Mobile Client signs in through the Identity Service using OAuth2. The Identity Service returns a JWT access token. A JWT is a signed token containing trusted identity information. The Product Reviews API sits inside the Java application boundary. It validates the JWT before using the request. The reviewer identity comes from JWT.sub, which identifies the authenticated user. The client must not send or choose its own userId.

2. Create a review

For creation, the client sends POST /v1/products/{productId}/reviews. The request includes Authorization: Bearer <JWT> and Idempotency-Key: <uuid>. The body contains only review data: rating, title, and body. The diagram's example uses rating 5, title Great product, and body Fast delivery and durable. The Product Reviews API performs JWT validation and request validation. It never trusts a user identity from the JSON body.

The Product Reviews API then asks the Product Catalog Service to validate productId. The Product Catalog Service responds that the product exists or reports 404 not found. This prevents a review from being attached to a product that does not exist.

3. Prevent duplicate reviews and store the data

The API applies its duplicate review guard before storing the review. The Reviews DB also enforces UNIQUE(product_id, user_id). This protects the rule shown in the diagram that a user should not create duplicate reviews for the same product. The Idempotency-Key handles a related case. It lets a client safely retry the same POST request without intentionally creating another review.

The API inserts the review using userId = JWT.sub. The Reviews DB stores fields including review_id, product_id, user_id, rating, title, body, created_at, updated_at, and status. The database returns either a stored result or a unique-constraint violation. A successful create returns 201 Created with reviewId, productId, rating, title, body, and createdAt. A duplicate returns 409 Conflict with code: DUPLICATE_REVIEW and existingReviewId.

4. Read product reviews

For reading, the client sends GET /v1/products/{productId}/reviews?page=1&size=10&sort=recent. The Product Reviews API asks the Reviews DB for reviews and aggregates. The database returns rows, average rating, and total count. The API then returns 200 OK with productId, averageRating, totalCount, and reviews.

The query parameters provide pagination and recent-first sorting. This avoids returning every review in one response and keeps the contract clear for the client.

5. Update, delete, and authorize changes

The diagram also shows PATCH /v1/reviews/{reviewId} and DELETE /v1/reviews/{reviewId}. These operations are allowed only for the review owner or an admin. Authentication and authorization are separate checks. JWT validation proves who the caller is. The ownership check decides whether that caller may change or delete the selected review.

Missing or invalid authentication can return 401. An authenticated caller who is not allowed can receive 403. The API continues to derive identity from the JWT instead of trusting a client-supplied user identifier.

6. Record operational information and explain the trade-off

The Product Reviews API sends structured logs and metrics to Audit / Metrics. This is an observability path and is separate from the business response path.

The main trade-off is extra work on each write. JWT validation, request validation, product validation, duplicate protection, and database constraints add processing and dependencies. The benefit is stronger identity handling and more reliable review data. The design keeps the API contract simple while placing final duplicate enforcement in the Reviews DB, where concurrent writes cannot bypass the unique constraint.

Practical Complexity & Trade-offs

The benefit of this design is that each rule has a clear owner. The Identity Service gives the client a JWT, while the Product Reviews API validates it and uses JWT.sub as the reviewer identity. This is safer than accepting userId from the request body. The database unique rule protects against competing requests creating reviews for the same product and user. The Idempotency-Key also makes POST retries safer. The downside is that creating a review needs several checks, including a call to the Product Catalog Service and a write to the Reviews DB. Those steps add latency and create more failure points. We accept this because product validation and duplicate prevention improve data correctness. Pagination also keeps large review lists manageable.

Why Interviewers Ask This

Interviewers use this question to test whether you can turn a product feature into clear API contracts. They want to see correct HTTP methods, resource paths, request bodies, status codes, and request directions. They also evaluate whether you separate authentication from authorization and handle user identity safely. Duplicate prevention tests concurrency and database judgment. A strong answer also explains idempotency, validation, error handling, logging, and the trade-off between stronger correctness and additional service calls.

Interviewer may ask next
What happens if two create-review requests for the same user and product arrive at almost the same time?

I would keep the same POST endpoint and rely on the database uniqueness rule as the final protection. Both requests may pass JWT validation, request validation, and the product check at nearly the same time. They may also both reach the duplicate review guard before either insert has completed. That means an application-only duplicate check is not enough. The important protection is UNIQUE(product_id, user_id) in the Reviews DB. One insert can succeed, while the competing insert receives a unique-constraint violation. The Product Reviews API maps that duplicate result to the shown 409 Conflict response with code: DUPLICATE_REVIEW and existingReviewId. The client also sends an Idempotency-Key for safe retries of the same POST request. These protections solve related but different problems. The database constraint handles competing requests for the same user and product. The idempotency key handles retrying the same request. The downside is extra database coordination, but it gives stronger correctness under concurrency.

How would you stop one user from editing or deleting another user's review?

I would keep the existing PATCH and DELETE endpoints and enforce the ownership check inside the Product Reviews API. The client sends its JWT with PATCH /v1/reviews/{reviewId} or DELETE /v1/reviews/{reviewId}. The API first validates the JWT and derives the caller identity from JWT.sub. It does not accept a client-supplied userId as proof of ownership. The API then checks whether that authenticated identity owns the requested review or has admin permission. If authentication is missing or invalid, the API can return 401. If the user is authenticated but is neither the review owner nor an admin, the API returns 403. Only an allowed caller may continue with the change. The rest of the design stays the same, including the Reviews DB and Audit / Metrics path. The downside is that every protected write needs an authorization check, but that extra check prevents users from modifying reviews they do not own.

24. How would you expose an API for unique address capture?API DesignMediumAmazon

Question Details

Design an API for capturing unique addresses worldwide, with clear handling of address scope and normalization.

Short Interview Answer (30-60 seconds)

At a high level, I would expose one capture API that accepts an address, its country, and its uniqueness scope. The request goes through an API Edge using HTTPS, JWT, and rate limits, then reaches POST /v1/addresses:capture. The Java service validates the payload, performs country-aware normalization, resolves the scope, builds a normalized unique key, and checks the Address Store. It returns an existing address or creates a canonical one. The unique index and optional idempotency key reduce duplicates. The trade-off is the extra complexity of worldwide normalization rules.

Detailed Explanation

The goal is to let clients send addresses from many countries and store each address only once inside the requested scope. The difficult part is that addresses are written differently around the world. We also need a clear rule for deciding when two addresses should count as the same. I would keep the original address, create a standard version, and compare that version inside the requested scope. The diagram shows the complete path from the client, through validation and normalization, to storage and the final response.

Useful Questions to Ask the Interviewer
  • What scopes do we need to support, such as GLOBAL, TENANT, or ACCOUNT?
  • Can clients send either free-form addresses or structured address fields?
  • Is postal or geographic verification required, or only optional enrichment?
  • Should an already captured address return its existing identifier instead of creating another record?
How would you expose an API for unique address capture? diagram
How to Explain It in an Interview
1. Start with the API boundary and request

I would expose POST /v1/addresses:capture for address capture. The client sends a capture request through the API Edge. The request can contain rawAddress or structured address fields, plus countryCode, scopeType, scopeId, and an optional idempotencyKey.

The API Edge handles HTTPS, JWT, and rate limits. It then forwards the API request to the Java Unique Address API. The optional idempotency key can prevent duplicate inserts when a client retries the same request.

2. Validate the payload

The Java API first performs Payload Validation. It checks the required fields and validates countryCode, scopeType, and scopeId. It also accepts the optional idempotencyKey shown in the request.

An invalid payload returns 400. This stops bad input before normalization or storage work begins.

3. Normalize the address using country rules

Next, the Normalization Engine creates a canonical, or standard, form of the address. It can parse free-form or structured input. It trims whitespace, normalizes casing, expands standard abbreviations, and standardizes country, state, and postal codes. It also supports Unicode and transliteration when needed.

Worldwide capture cannot rely on one universal address string format. The engine therefore uses the Country Rules / Reference Catalog for ISO codes, region aliases, and postal rules.

Postal / Geo Validation is optional. It can verify or enrich the normalized address. If the service cannot normalize or verify the address when required, the diagram shows a 422 response.

4. Resolve the uniqueness scope

The Scope Resolver decides the uniqueness boundary. The diagram shows example scopes of GLOBAL, TENANT, and ACCOUNT.

This matters because the same canonical address can be treated differently under different scopes. The selected scopeType and scopeId therefore become part of the uniqueness key.

5. Build the unique key and check the Address Store

The Unique Key + Match Check builds a deterministic key using scopeType + scopeId + normalizedHash. The normalized hash represents the canonical address components.

The service performs the lookup or insert against the Address Store. The store keeps the raw submitted address, canonical normalized fields, and scope metadata. It also enforces a unique index on (scopeType, scopeId, normalizedHash).

If a matching record exists, the service returns the existing addressId. If there is no match, it creates the canonical address. The storage-level unique index is the final protection against duplicate scoped records.

6. Return the response and record the event

The response contains addressId, canonicalAddress, scope, and status=new|existing. A newly created address returns 201 Created. An address already captured in the requested scope returns 200 OK.

The response returns from the Java API through the API Edge and then back to the client. Separately, the Java API sends an AddressCaptured or AddressReused event to the Audit Event Log. The audit log records the event but is not part of the business response path.

The main trade-off is normalization complexity. Country-specific rules and optional verification improve consistency and duplicate detection, but they require more reference data and maintenance.

Practical Complexity & Trade-offs

The benefit of this design is that one API can support many countries without pretending every country uses the same address format. Country-aware normalization makes duplicate checks more reliable. Scope gives flexible uniqueness because an address can be unique globally or inside a tenant or account. The storage unique index is important because it gives one final rule for (scopeType, scopeId, normalizedHash). The optional idempotency key also helps with repeated client requests. The downside is added complexity. Country rules can change, normalization is not always perfect, and optional postal or geographic verification adds another dependency. Keeping both raw and canonical forms uses more storage, but it preserves the original input. Rate limiting at the API Edge helps protect the service from excessive traffic.

Why Interviewers Ask This

Interviewers use this question to test whether you can turn a business requirement into a clear API and data model. They want to see correct request and response flow, sensible validation, worldwide address normalization, and a precise definition of uniqueness. They also evaluate your judgment around idempotency, rate limiting, database constraints, error responses, and audit logging. A strong answer explains why each choice exists and communicates the trade-offs clearly instead of only listing components.

Interviewer may ask next
What would you change if many clients send the same address at the same time?

I would keep the same API contract and rely on the Address Store as the final authority for uniqueness. The affected flow is the Unique Key + Match Check after POST /v1/addresses:capture. Each request still validates its input, performs country-aware normalization, resolves the scope, and builds the same scopeType + scopeId + normalizedHash key. Several requests could reach the match check at nearly the same time. The unique index on (scopeType, scopeId, normalizedHash) prevents more than one canonical record from being stored for that scope. The successful new record returns 201 Created. A request that resolves to an already captured record returns the existing addressId with 200 OK and status=existing. An optional idempotencyKey also helps when the same client retries a request. The API Edge keeps applying rate limits. The downside is that competing requests may repeat normalization and lookup work, but the stored result remains unique within the requested scope.

How would you handle a country whose address rules are difficult or change over time?

I would keep the country-specific behavior inside the Normalization Engine and Country Rules / Reference Catalog. The endpoint does not need to change. POST /v1/addresses:capture still receives the address, countryCode, scopeType, scopeId, and optional idempotencyKey. The Normalization Engine uses the applicable ISO codes, region aliases, postal rules, abbreviation handling, and Unicode or transliteration rules. If useful, the optional Postal / Geo Validation component can verify or enrich the result. The Address Store still keeps both the raw submitted address and the canonical normalized fields, so the original client input is preserved. If the address cannot be normalized or verified when required, the existing 422 failure remains the response. Scope resolution and the unique key flow remain unchanged after normalization succeeds. The downside is maintenance because country rules and reference data must be kept current. More complex normalization can also add processing work, but it improves consistency for worldwide address capture.

25. Tell me about a time you had to motivate a group of individuals.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a time when a team was losing energy during a difficult project, how you understood what was causing the problem, helped the group see a clear path forward, supported people with practical actions, and kept everyone focused until the work was completed.

Situation

In my last role, I was working with a small development team on a Java service that had become difficult to maintain. We were dealing with repeated defects, unclear ownership, and several changes in requirements. After a few difficult weeks, I noticed that people were becoming quiet in meetings and were less willing to take ownership of difficult tasks.

Task

I was responsible for an important part of the service, but I also wanted to help the group regain confidence and make steady progress. I did not have formal authority over everyone, so I needed to motivate the team through communication, practical support, and a clearer way of working.

Action

I first spoke with team members individually so I could understand what was causing the frustration. The main issue was not a lack of effort. People felt that the work was never really finished because new problems kept appearing. I brought this back to the team and suggested that we break the remaining work into smaller pieces with clear owners and clear completion conditions. I volunteered to take one of the more difficult Java modules and worked through its issues openly so others could see that the problems were manageable. I also started using our daily discussion to highlight completed work and explain how each completed task reduced risk for the whole service. When someone was blocked, I paired with them or helped find the right person instead of allowing the problem to stay unresolved. I made sure I did not pressure people with artificial urgency. Instead, I connected each task to the larger goal of making the service stable and easier for us to support. As the team started completing smaller pieces, I encouraged people to share what they had learned so the progress felt like a group achievement rather than a list of individual tasks.

Result

The team's energy improved because the work became clearer and progress became visible. People started taking ownership again, discussions became more active, and we were able to finish the difficult stabilization work with better collaboration. I learned that motivating a group is often less about giving an inspiring speech and more about removing uncertainty, showing progress, helping people through blockers, and making their contribution feel meaningful.

Why Interviewers Ask This

Interviewers ask this question to understand whether a candidate can influence and support others without depending only on formal authority. A strong answer shows empathy, communication, practical leadership, good judgment, and the ability to help a group stay focused when motivation is low.

Interviewer may ask next
How did you handle team members who were still resistant or discouraged?

I tried to understand the reason before pushing for action. In this case, resistance came mainly from repeated setbacks and unclear ownership. I addressed those causes by making the work smaller, clarifying responsibilities, and helping directly with blockers. Once people could see real progress, most of the resistance reduced naturally.

What would you do differently if you faced the same situation again?

I would look for signs of low motivation earlier instead of waiting until it became obvious in team meetings. I would start individual conversations sooner and make progress more visible from the beginning. That would help address frustration before it grows and make it easier for the team to maintain confidence.

26. Tell me about a time you were 75% through a project and had to pivot quickly.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a project that was already far along when an important requirement changed, how you reassessed the remaining work, protected the most important user need, communicated the impact, adjusted the implementation plan, and delivered a reliable result.

Situation

In my last role, I was working on a Java service that processed requests from an internal application. Most of the development was complete, and we had already finished the main business logic and started integration testing. At that point, we learned that another system we depended on could no longer support the integration approach we had planned. We needed to change the design quickly without throwing away the work that was still useful.

Task

I was responsible for the service implementation and for helping the team adjust the technical approach. My goal was to find the smallest safe change that would support the new integration requirement while protecting the parts of the service that were already tested and working.

Action

I first reviewed the current design and separated the code that depended on the old integration from the core business logic. This helped me understand what we could keep and what actually needed to change. I then discussed the new requirement with the team that owned the other system so I could confirm its expected request format, response behavior, and failure cases before changing our code. Based on that information, I proposed replacing only the integration layer instead of redesigning the whole service. I kept the existing business logic and introduced a clear Java interface between that logic and the external integration code. I then implemented the new integration behind that interface and updated the related tests. I also added tests for timeout, invalid response, and unavailable dependency cases because the new approach introduced different failure behavior. As I worked, I kept my team informed about what was changing, what could remain unchanged, and which parts still carried risk. We focused our testing on the changed integration path while continuing to run the existing regression tests so that the pivot did not break previously working behavior.

Result

We were able to move to the new integration approach without restarting the project or rewriting the stable parts of the service. The updated service completed integration testing successfully and the team was able to continue toward release with a design that matched the new dependency requirements. I learned that when a project changes late, the fastest response is not always to rewrite everything. It is better to isolate what truly changed, preserve proven work, communicate the impact early, and focus testing on the new risk.

Why Interviewers Ask This

Interviewers ask this question to understand how a candidate reacts when an important project assumption changes late in the work. A strong answer shows adaptability, sound judgment, ownership, clear communication, and the ability to protect useful progress while changing direction quickly.

Interviewer may ask next
Why did you change only the integration layer instead of redesigning the whole service?

I wanted to reduce both delivery risk and unnecessary work. The core business logic was already working and tested, while the problem was limited to how we communicated with the dependent system. By isolating that change behind an interface, I could adapt the integration without disturbing stable code.

What would you do differently if you faced a similar late change again?

I would validate important external dependencies earlier and document their assumptions more clearly during design. I would also keep integration boundaries isolated from the beginning so that a change in one dependency has less impact on the rest of the service.

27. Tell me about a time a team member did not meet your expectations on a project.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a project where a team member was falling behind on an important responsibility, how you understood the cause, clarified expectations, offered practical support, protected the delivery plan, and helped the team complete the work successfully.

Situation

In my last role, I was working with a small development team on a Java service that needed several API changes before a planned release. One team member owned an important part of the implementation, but I noticed that their tasks were repeatedly slipping and their code reviews were arriving later than the team expected. This was starting to block integration work for the rest of us.

Task

I needed to help keep the project moving without immediately assuming the team member was careless or incapable. My responsibility was to understand what was causing the delay, make the expectations clear, and find a practical way to complete the work while keeping a positive working relationship.

Action

I first spoke with the team member privately instead of raising the issue in a group meeting. I explained the specific impact I was seeing, such as delayed integration and other developers waiting for their changes, and I asked whether anything was blocking them. They explained that part of the Java service was unfamiliar to them and they had been spending too much time trying to solve several issues alone. I reviewed the remaining work with them and helped separate it into smaller tasks with clear completion points. We also identified the most important changes needed for the release so we could focus on those first. I paired with them on the most difficult section and explained how the existing service handled validation and error responses. After that, I asked them to continue independently but encouraged them to raise questions earlier instead of waiting until they had exhausted every option. I also checked progress during our normal team discussions so the situation remained visible without singling them out. At the same time, I adjusted my own integration work so I could begin testing completed pieces instead of waiting for everything at once. This reduced the risk that one delayed task would block the entire release.

Result

The team member completed the required work, and we were able to integrate the changes without creating a larger delivery problem. More importantly, communication improved after that conversation, and they started raising blockers earlier. I learned that when someone is not meeting expectations, I should first understand the reason, make the impact clear, and provide the right support before treating it as a performance problem.

Why Interviewers Ask This

Interviewers ask this question to understand how a candidate handles accountability, difficult conversations, and teamwork when another person is not meeting expectations. A strong answer shows that the candidate addresses problems early, communicates respectfully, focuses on facts and project impact, supports teammates when appropriate, and still takes responsibility for protecting the team's goals.

Interviewer may ask next
Why did you speak with the team member privately first?

I wanted to understand the situation before making assumptions, and a private conversation gave them space to explain the real problem openly. It also let me discuss the impact clearly without embarrassing them in front of the team. That helped us focus on solving the issue instead of creating unnecessary tension.

What would you have done if their performance had not improved?

I would have continued documenting the specific delivery impact and discussing clear expectations with them. If the same problem continued after reasonable support and communication, I would involve the appropriate team lead or manager so we could decide how to protect the project and provide any additional help that was needed.

28. Tell me about a time you improved a process with limited budget.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a realistic situation where you improved an inefficient development process without buying new tools, identified the main source of wasted effort, reused existing technology, worked with the team to make the change practical, and showed that the new process improved reliability or saved development time.

Situation

In my last role, our Java team had a manual process for checking application configuration before a release. Developers reviewed several configuration files by hand and compared values across environments. This took time and sometimes allowed simple configuration mistakes to reach the testing environment. We wanted to improve the process, but there was no budget for a new commercial deployment or configuration management tool.

Task

I was responsible for finding a practical way to reduce these manual checks without adding new software costs or creating a complicated system that the team would have to maintain. I also wanted the solution to fit our existing development and deployment process so that developers would actually use it.

Action

I first reviewed the manual steps with the developers who performed releases most often. I found that most of the effort came from checking the same required properties, allowed values, and environment specific rules each time. Instead of proposing a new platform, I suggested automating those checks with tools we already had. I created a small Java validation utility that loaded the configuration files and checked required properties, value formats, and basic relationships between settings. I kept the rules simple and placed them in the same source repository as the application so changes could go through normal code review. I then added the validator to our existing build pipeline so it ran automatically before deployment. I tested it against several known configuration mistakes and asked other developers to review the messages it produced. Based on their feedback, I made the error messages clearer so a developer could quickly see which setting needed attention. I also documented how to add a new validation rule. This avoided introducing another paid product and kept the solution within technology the team already understood.

Result

The team no longer had to depend only on repeated manual configuration checks before each release. Common configuration problems were caught earlier in the build process, and releases became more consistent without adding software cost. The change also showed me that process improvement does not always require a large budget. Understanding the real source of wasted effort and using existing tools well can provide a simpler and more sustainable solution.

Why Interviewers Ask This

Interviewers ask this question to evaluate whether a candidate can improve efficiency while working within real constraints. A strong answer shows practical judgment, ownership, prioritization, and the ability to find a useful solution without assuming that more money or more technology is always necessary.

Interviewer may ask next
Why did you choose to build a small Java validator instead of requesting a new tool?

I chose the Java validator because the problem was narrow and the team already had the skills and build infrastructure needed to support it. A new tool would have added cost, setup work, and another system to maintain. Using our existing Java environment allowed us to solve the important problem with less complexity.

What would you do differently if you handled the same process improvement today?

I would involve the developers who perform releases even earlier when defining the validation rules. Their feedback was very useful once I showed them the first version. Getting that input at the beginning would help me identify the highest value checks sooner and keep the first version even more focused.

29. Tell me about a time you disagreed with a supervisor and had to commit anyway.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a realistic situation where you disagreed with your supervisor about a technical approach, explained your concerns with clear evidence, listened to the reasoning behind the final decision, committed to that decision once it was made, and helped the team deliver a reliable result.

Situation

In my last role, my team was adding a new feature to a Java service. My supervisor wanted us to extend an existing service instead of creating a separate service. I disagreed because I felt the new responsibility could make the existing service harder to maintain and increase the impact of future changes.

Task

I was responsible for implementing a large part of the change. I needed to raise my concern clearly, help the team understand the technical tradeoffs, and then support the final decision even if my preferred design was not selected.

Action

I first reviewed the existing Java service and identified the areas that would be affected by the new logic. I wrote down my concerns in simple terms, including tighter coupling between responsibilities, more complex testing, and a greater chance that future changes could affect unrelated behavior. I discussed these points with my supervisor privately instead of turning the disagreement into a team conflict. I also suggested an alternative where the new responsibility would be isolated in a separate service. My supervisor explained that the delivery timeline was important and that introducing another service would add deployment, monitoring, and operational work that the team did not need yet. After hearing that reasoning, I still preferred more separation, but I understood the broader constraint. Once the decision was made, I committed to it fully. I did not continue arguing or work around the decision. Instead, I focused on making the chosen design as safe as possible. I separated the new logic into clear Java classes, kept interfaces small, added focused unit and integration tests, and documented the boundary so the code could be extracted later if the responsibility grew. I also kept my supervisor informed about implementation risks as the work progressed.

Result

We completed the feature with a design that met the immediate delivery need while keeping the new logic reasonably isolated. The code remained understandable and testable, and the team had a clear path to separate the responsibility later if needed. I learned that disagreeing constructively is important, but after a well informed decision is made, supporting it with full ownership is just as important.

Why Interviewers Ask This

Interviewers ask this question to understand how a candidate handles disagreement with authority while still supporting team decisions. A strong answer shows respectful communication, sound judgment, willingness to listen, professional commitment after a decision is made, and ownership of the final outcome.

Interviewer may ask next
What made you decide to stop pushing your preferred design?

My supervisor gave a reasonable explanation that included delivery time and the operational cost of adding another service. I had already explained my technical concerns clearly, so continuing to argue would not have helped the team. Once I understood the broader constraints and the decision was made, I focused on reducing risk within the chosen approach.

What would you do differently in a similar situation now?

I would still raise the concern early, but I would try to make the tradeoff even more concrete before the discussion. For example, I would compare the implementation and operational cost of both options in a short design note. That could make the decision faster while still allowing everyone to understand the long term impact.

30. Tell me about a time you went above and beyond for a customer.BehavioralMediumAmazon

Interview tip:

Use STAR to structure your answer: briefly explain the Situation and Task, make Action the most detailed part, and finish with the Result. For example, describe a customer issue where you took extra ownership beyond the immediate fix, understood the real impact, communicated clearly, improved the Java service, verified the solution carefully, and helped prevent the same problem from happening again.

Situation

In my last role, a customer reported that an important workflow was sometimes failing when their application sent a certain type of request to our Java service. The normal support process was to investigate the failed request, provide a fix, and close the issue. After reviewing the case, I saw that the failure was affecting a workflow the customer depended on regularly, so I wanted to understand more than just the immediate error.

Task

I was responsible for finding the cause and delivering a safe fix. I also decided to look at the customer's full usage pattern so that we could reduce the chance of another related failure. My goal was to solve the current problem without creating risk for other customers who used the same service.

Action

I first reproduced the issue using a request that matched the customer's scenario. I traced the request through the Java service and found that one validation path handled an optional field differently from other paths. That caused a valid request to fail under a specific condition. I corrected the validation logic and added tests for the reported case as well as similar cases around it. Before releasing the change, I reviewed service logs to check whether the same pattern appeared elsewhere. I found a few related failures, so I expanded the tests to cover those conditions too. I then worked with the support team to explain the cause in simple terms and gave them clear information they could share with the customer. I also stayed involved after the fix was released instead of treating deployment as the end of the task. I checked the relevant logs, confirmed that the affected requests were succeeding, and documented the validation behavior so another developer would not accidentally reintroduce the issue later. I took these extra steps because fixing only the single failed request would have solved the visible symptom but not the broader customer risk.

Result

The customer's workflow worked correctly after the change, and the related validation cases were covered by automated tests. The support team also had a clearer explanation of what happened and how it was resolved. I learned that going above and beyond for a customer does not always mean building something extra. Sometimes it means taking full ownership of the problem, understanding the wider impact, and making the solution more reliable than the minimum fix requires.

Why Interviewers Ask This

Interviewers ask this question to understand how strongly a candidate takes ownership of customer problems. A strong answer shows that the candidate looks beyond the minimum requirement, understands customer impact, makes careful technical decisions, communicates clearly, and improves the long term reliability of the service without creating unnecessary risk.

Interviewer may ask next
Why did you investigate related failures instead of stopping after fixing the reported request?

I wanted to make sure I was fixing the underlying behavior rather than only one visible example. Since the same validation path could affect other requests, checking related failures helped me confirm the real scope and add tests that protected the service more completely.

What would you do differently if you handled a similar customer issue today?

I would involve the support team even earlier so we could confirm the customer's exact workflow and impact while I was reproducing the issue. I would still follow the same approach of fixing the root cause, testing nearby cases, and verifying the service after release.

More questions load as you scroll

Disclaimer: This interview guide is for educational and informational purposes only. It is designed to help readers prepare, but it does not guarantee any interview result, hiring decision, offer, or outcome. Interview questions, hiring criteria, and preferred answers can vary by employer, interviewer, industry, location, and time. The examples and explanations reflect the authors' research and judgment, are provided without warranties of any kind, and should not be treated as the only correct approach. Diagrams are simplified illustrations intended to highlight the main components and their interactions; actual systems and implementations may be more complex. Alternative approaches may be equally valid or better suited to a particular question, context, or interviewer. To the fullest extent permitted by applicable law, the author, contributors, and publisher are not liable for decisions made, actions taken, or losses incurred based on this guide.

Company Notice: This guide is an independent educational resource and is not affiliated with, endorsed by, sponsored by, or approved by the company named in this guide. Company names are used only to identify interview experiences commonly reported by candidates. Interview practices can change without notice, and inclusion of company-specific content does not mean these questions are official, complete, or guaranteed to be asked. To the fullest extent permitted by law, the author, contributors, and publisher are not responsible for outcomes related to use of this material.