← Dispatch Interview Insights

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

Intermediate
Apr 2026

Summary

Got an online assessment from Dispatch for a software engineer role. It was a single coding problem involving the AWS SDK and S3, nothing behavioral, just write the thing and get it working.

Questions Asked (1)

Q1

Using the AWS SDK for JavaScript v3 in Node.js, write a program that lists all objects in a public S3 bucket, filters for keys matching a specific naming convention, and returns each matching key along with its custom metadata.

API & IntegrationsTechnical Trade-offs
Author's notes

The S3 part wasn't hard but the metadata retrieval tripped me up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that the bucket is public, so no credentials are needed, but note that ListObjectsV2 returns only up to 1000 keys per call, so pagination is required. Then outline the use of ListObjectsV2Command to list keys, filter them with a regex or prefix, and for each matching key, call HeadObjectCommand to retrieve custom metadata. Emphasize error handling and performance considerations.

Pro tip: Mention that custom metadata is only returned by HeadObject, not by ListObjectsV2, and that you can reduce API calls by using the ListObjectsV2 response to filter keys before calling HeadObject. Also, note that metadata keys are case-insensitive and returned with the 'x-amz-meta-' prefix.

1. Clarify requirements and constraints

Confirm the naming convention (e.g., regex pattern), the need for custom metadata, and that the bucket is public (no credentials). Discuss pagination limits and potential performance implications.

2. List objects with pagination

Use ListObjectsV2Command with the bucket name and a continuation token to handle pagination. Collect all keys or process them in batches.

3. Filter keys by naming convention

Apply a regex or string matching to the keys from the list response to identify those that match the specified pattern.

4. Fetch custom metadata for matching keys

For each matching key, call HeadObjectCommand to retrieve the object's metadata. Extract the custom metadata from the response (under Metadata).

5. Return results and handle errors

Aggregate the matching keys and their metadata into an array or object, and implement error handling for network issues or missing objects.

Key Points to Mention

  • Use of ListObjectsV2Command and pagination via ContinuationToken
  • Filtering keys with regex or prefix matching
  • HeadObjectCommand to retrieve custom metadata (x-amz-meta-*)
  • Error handling and retries (e.g., using SDK's built-in retry mechanism)
  • Performance optimization: batching or limiting concurrent HeadObject calls
  • Case-insensitivity of metadata keys and proper extraction

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