← Dispatch Interview Insights

Dispatch·Software Engineer·Online Assessment (OA)·Intermediate

IntermediatePrefer not to say
Jun 2026Remote

Summary

Got an online assessment from Dispatch for a Software Engineer role. It was a single coding problem involving the AWS SDK for S3, which I wasn't expecting to be the whole thing. Felt more like a practical scripting task than a typical algo interview.

Questions Asked (1)

Q1

Write a Node.js program using the AWS SDK to list all files in a public S3 bucket, filter to keys starting with a specific prefix, and then fetch and print the metadata for each matching file. Handle pagination for buckets with more than 1000 keys.

API & IntegrationsTechnical Trade-offs
Author's notes

I'd used the AWS SDK before but mostly with higher-level wrappers, so dropping into ListObjectsV2 and HeadObject directly was a bit of a context switch.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then outline a solution using the AWS SDK for JavaScript v3. Emphasize the use of pagination with ListObjectsV2 and handling of metadata retrieval via HeadObject, while discussing trade-offs like performance and error handling.

Pro tip: Mention that you would use the S3 client's paginateListObjectsV2 method to simplify pagination, and consider concurrency limits when fetching metadata to avoid throttling.

1. Clarify requirements and constraints

Ask about the specific prefix, whether the bucket is truly public, and any performance or error-handling expectations. Confirm the AWS SDK version and runtime environment.

2. Set up the S3 client and list objects with pagination

Use the ListObjectsV2Command with a Prefix parameter and handle pagination via ContinuationToken or the paginateListObjectsV2 helper. Collect all matching keys.

3. Fetch metadata for each key

For each key, call HeadObjectCommand to retrieve metadata. Consider using Promise.all with a concurrency limit to avoid overwhelming the service.

4. Print metadata and handle errors

Output the metadata in a readable format. Implement error handling for network issues, missing keys, or permission errors, and discuss retry strategies.

5. Discuss trade-offs and optimizations

Talk about performance implications of sequential vs. parallel metadata fetching, memory usage for large buckets, and alternatives like using S3 Inventory or batch operations.

Key Points to Mention

  • Use of AWS SDK v3 for JavaScript/Node.js and modular commands
  • Pagination with ListObjectsV2 and ContinuationToken or paginateListObjectsV2
  • Prefix filtering to reduce the number of keys returned
  • HeadObject for metadata retrieval and its limitations (e.g., no metadata for non-existent keys)
  • Concurrency control when fetching metadata to avoid throttling
  • Error handling and retry logic with exponential backoff

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.