create-aws-sdk-repro is a CLI tool that generates ready-to-run project environments for AWS SDK for JavaScript v3. It supports Node.js, Browser (Vite + Cognito), and React Native environments across AWS services with autocomplete, operation validation, and typo detection.
- Node.js
- AWS credentials configured on your machine (for Node.js projects)
# Clone the repository
git clone https://github.com/awslabs/create-aws-sdk-repro.git
cd create-aws-sdk-repro
# Install dependencies
npm install
# Run the CLI
node src/cli.jsThe CLI guides you through the following steps:
AWS SDK Reproduction Project Generator
? Select JavaScript environment: (Node.js / Browser / React Native)
? Enter project name: aws-sdk-repro1234567890
? Select or search for AWS service: (autocomplete from 198 services)
Fetching available operations for S3...
Found 128 operations
? Select or search for operation (kebab-case): list-buckets
? Select or enter AWS region: us-east-1 - US East (N. Virginia)
Successfully created JS project at:
/path/to/aws-sdk-repro1234567890
To get started:
cd aws-sdk-repro1234567890
npm install
npm startGenerates a project using the default AWS credential chain. Run with npm start.
Generates a Vite-based project with Amazon Cognito Identity Pool for browser-safe credentials. A COGNITO_SETUP.md guide is included with setup instructions. Run with npm start (opens browser via Vite dev server).
Generates a full React Native project via @react-native-community/cli (pinned to RN 0.76.6 for Xcode 15 compatibility). Includes required polyfills (react-native-get-random-values, react-native-url-polyfill, web-streams-polyfill) and Cognito authentication.
- Service autocomplete: Search across
@aws-sdk/client-*packages with fuzzy matching - Typo detection: Levenshtein distance (max 2 edits) suggests corrections for mistyped services and regions
- Dynamic operation discovery: Temporarily installs the selected SDK package to discover available operations and extract the correct client name (e.g.,
DynamoDBClientnotDynamodbClient) - Region validation: AWS regions with display names, format validation, and underscore-to-hyphen correction
- Kebab-case input: Operations entered as
list-bucketsare automatically converted toListBucketsCommand
To test the CLI end-to-end:
# Run the CLI and generate a project
node src/cli.js
# Navigate to the generated project
cd <your-project-name>
# Install dependencies and run
npm install
npm startFor Node.js projects, ensure your AWS credentials are configured (aws configure or environment variables). For Browser and React Native projects, follow the generated COGNITO_SETUP.md to configure an Identity Pool before running.
# Generate a Node.js project for S3 ListBuckets
node src/cli.js
# Select: Node.js → any project name → @aws-sdk/client-s3 → list-buckets → us-east-1
# Verify the generated project runs
cd <project-name>
npm install
npm startOperations like ListBuckets, DescribeInstances, and ListTables work with an empty input object, so the generated project runs out of the box. For operations that require parameters, modify the input object in the generated index.js:
const input = {
// Add your input parameters here
// IDE autocomplete will show available fields since types are already imported
};See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.