Skip to content

Instantly share code, notes, and snippets.

View pajaydev's full-sized avatar

Ajaykumar pajaydev

View GitHub Profile
@pajaydev
pajaydev / export-dynamodb-table.py
Last active December 7, 2023 23:15
Script to export Dynamodb records from old table and migrate those records to new dynamodb table.
import boto3
import json
SOURCE_TABLE_NAME = "--replace-source-tablename--"
DESTINATION_TABLE_NAME = "--replace-destination-tablename--"
# export records in tableName.json file
OUTPUT_FILE = f"{SOURCE_TABLE}.json"
# replace region
AWS_REGION = "us-west-2"
failed_updates = []