← Dispatch Interview Insights

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

Intermediate
May 2026

Summary

Got an online assessment from Dispatch for a software engineer role, basically one coding problem involving the AWS S3 SDK. Pretty niche ask for an OA, felt more like a take-home task than a typical algo screen.

Questions Asked (1)

Q1

Write a Node.js program using the AWS S3 SDK to list all files in a public S3 bucket, filter for keys starting with a specific prefix, then fetch and print each matching file's metadata using HeadObject.

API & IntegrationsTechnical Trade-offs
Author's notes

The pagination part is where I almost slipped up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the overall flow: create an S3 client, use ListObjectsV2 with the prefix parameter to retrieve matching keys, then iterate over the results and call HeadObject for each key to fetch metadata. Emphasize error handling, pagination, and concurrency considerations, and mention that public buckets may still require unsigned requests or proper permissions.

Pro tip: Mention that ListObjectsV2 already supports prefix filtering server-side, so you don't need to fetch all objects and filter client-side—this reduces data transfer and improves performance. Also, note that HeadObject calls can be parallelized with a concurrency limit to avoid throttling.

1. Set up the S3 client

Import the AWS SDK and create an S3 client instance, configuring the region and any necessary credentials (or using unsigned requests for public buckets).

2. List objects with prefix

Use ListObjectsV2 with the Bucket and Prefix parameters to retrieve only the keys that start with the given prefix, handling pagination via ContinuationToken if needed.

3. Fetch metadata for each key

For each matching key, call HeadObject to retrieve its metadata, and collect the results. Consider using Promise.all with a concurrency limit to avoid overwhelming the service.

4. Print the metadata

Iterate over the fetched metadata and print the relevant fields (e.g., ContentLength, LastModified, ContentType) for each file.

5. Handle errors and edge cases

Implement error handling for network issues, missing permissions, or non-existent keys, and discuss trade-offs like rate limiting and retry strategies.

Key Points to Mention

  • Use ListObjectsV2 with the Prefix parameter for efficient server-side filtering.
  • Handle pagination with ContinuationToken to retrieve all matching objects.
  • Use HeadObject to fetch metadata for each key, and consider concurrency limits to avoid throttling.
  • For public buckets, you may need to use unsigned requests or configure credentials appropriately.
  • Implement error handling and retries for robustness, especially for HeadObject calls.
  • Discuss trade-offs between sequential and parallel HeadObject calls (speed vs. resource usage).

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