Skip to main content

A CLI tool to migrate Excel data to AWS Amplify

Project description

Amplify Excel Migrator

PyPI version Python versions Downloads License: MIT

A CLI tool to migrate data from Excel files to AWS Amplify GraphQL API. Developed for the MECO project - https://github.com/sworgkh/meco-observations-amplify

Installation

From PyPI (Recommended)

Install the latest stable version from PyPI:

pip install amplify-excel-migrator

From GitHub

Install directly from GitHub:

pip install git+https://github.com/EyalPoly/amplify-excel-migrator.git

From Source

Clone the repository and install:

git clone https://github.com/EyalPoly/amplify-excel-migrator.git
cd amplify-excel-migrator
pip install .

For Development

Install with development dependencies:

pip install -e ".[dev]"

This installs the package in editable mode with pytest and other development tools.

Usage

The tool has three subcommands:

1. Configure (First Time Setup)

Save your AWS Amplify configuration:

amplify-migrator config

This will prompt you for:

  • Excel file path
  • AWS Amplify API endpoint
  • AWS Region
  • Cognito User Pool ID
  • Cognito Client ID
  • Admin username

Configuration is saved to ~/.amplify-migrator/config.json (passwords are never saved).

2. Show Configuration

View your current saved configuration:

amplify-migrator show

3. Run Migration

Run the migration using your saved configuration:

amplify-migrator migrate

You'll only be prompted for your password (for security, passwords are never cached).

Quick Start

# First time: configure the tool
amplify-migrator config

# View current configuration
amplify-migrator show

# Run migration (uses saved config)
amplify-migrator migrate

# View help
amplify-migrator --help

Example: Configuration

╔════════════════════════════════════════════════════╗
║        Amplify Migrator - Configuration Setup      ║
╚════════════════════════════════════════════════════╝

📋 Configuration Setup:
------------------------------------------------------
Excel file path [data.xlsx]: my-data.xlsx
AWS Amplify API endpoint: https://xxx.appsync-api.us-east-1.amazonaws.com/graphql
AWS Region [us-east-1]:
Cognito User Pool ID: us-east-1_xxxxx
Cognito Client ID: your-client-id
Admin Username: admin@example.com

✅ Configuration saved successfully!
💡 You can now run 'amplify-migrator migrate' to start the migration.

Example: Migration

╔════════════════════════════════════════════════════╗
║             Migrator Tool for Amplify              ║
╠════════════════════════════════════════════════════╣
║   This tool requires admin privileges to execute   ║
╚════════════════════════════════════════════════════╝

🔐 Authentication:
------------------------------------------------------
Admin Password: ********

Requirements

  • Python 3.8+
  • AWS Amplify GraphQL API
  • AWS Cognito User Pool
  • Admin access to the Cognito User Pool

Features

  • Configuration caching - Save your setup, reuse it for multiple migrations
  • Interactive prompts - Easy step-by-step configuration
  • Custom types and enums - Full support for Amplify custom types
  • Duplicate detection - Automatically skips existing records
  • Async uploads - Fast parallel uploads for better performance
  • MFA support - Works with multi-factor authentication
  • Automatic type parsing - Smart field type detection and conversion

Excel File Format

The Excel file should have:

  • One sheet per Amplify model (sheet name must match model name)
  • Column names matching the model field names
  • First row as headers

Example Excel Structure

Sheet: User

name email age
John john@example.com 30
Jane jane@example.com 25

Sheet: Post

title content userId
First Post Hello World john@example.com

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amplify_excel_migrator-1.2.3.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amplify_excel_migrator-1.2.3-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file amplify_excel_migrator-1.2.3.tar.gz.

File metadata

  • Download URL: amplify_excel_migrator-1.2.3.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for amplify_excel_migrator-1.2.3.tar.gz
Algorithm Hash digest
SHA256 b91bbd7708b90e68ece312da01fadca18a6f4f60e1fe8db06f3e7b6e962a4657
MD5 a157d25d186fd665db93b8c91cd8a903
BLAKE2b-256 2ceffb864b88a692d6027dfe49ec1b91951c275a0e5f22a32d4df6112f4b14f7

See more details on using hashes here.

File details

Details for the file amplify_excel_migrator-1.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for amplify_excel_migrator-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e1dc3d84b7859ff48ed309996d2311e289563ffc0db285903e9b93bc87450a5
MD5 e8f330c9474160445b092f3ef80192e0
BLAKE2b-256 3cf1ac374d168caa6169cfcf630fb2fdddf988c6402f06af8da1e864aaee4077

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page