Fetch Public S3 Object Metadata

Quick Overview

This question evaluates familiarity with programmatic access to public cloud object storage using an SDK, including skills in listing objects, filtering keys by a naming convention, and retrieving custom object metadata.

Fetch Public S3 Object Metadata

Company: Dispatch

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

In Node.js, using AWS SDK for JavaScript v3, write a program that accesses the public S3 bucket `coderbytechallengesandbox` in region `us-east-1` without providing access keys. List all objects in the bucket, identify the object keys that follow the challenge's `cb` naming convention (the sample key is `__cb__example.txt`), and output an array containing each matching object's key and custom metadata. Example output: ```js [ { key: "__cb__example.txt", metadata: { "custom-key": "custom-value" } } ] ``` Starter code: ```js const { S3Client } = require("@aws-sdk/client-s3"); const s3Client = new S3Client({ region: "us-east-1" }); // TODO: implement this ```

Quick Answer: This question evaluates familiarity with programmatic access to public cloud object storage using an SDK, including skills in listing objects, filtering keys by a naming convention, and retrieving custom object metadata.

|Home/Software Engineering Fundamentals/Dispatch
Dispatch logo
Dispatch
Apr 5, 2026, 12:00 AM
easySoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
10
0

In Node.js, using AWS SDK for JavaScript v3, write a program that accesses the public S3 bucket coderbytechallengesandbox in region us-east-1 without providing access keys. List all objects in the bucket, identify the object keys that follow the challenge's cb naming convention (the sample key is __cb__example.txt), and output an array containing each matching object's key and custom metadata.

Example output:

[
  { key: "__cb__example.txt", metadata: { "custom-key": "custom-value" } }
]

Starter code:

const { S3Client } = require("@aws-sdk/client-s3");
const s3Client = new S3Client({ region: "us-east-1" });
// TODO: implement this
Loading comments...