Skip to content

Instantly share code, notes, and snippets.

@resatarikan
resatarikan / migrate_ssm_parameters.py
Created January 26, 2025 10:40
This Python script automates the migration of AWS Systems Manager (SSM) parameters from one AWS region to another. It retrieves all parameters from the source region, including their values (with decryption for secure strings), and replicates them in the target region. The script ensures parameter integrity by preserving their type, description,…
import boto3
import json
def migrate_ssm_parameters(source_region, target_region):
source_client = boto3.client('ssm', region_name=source_region)
target_client = boto3.client('ssm', region_name=target_region)
next_token = None
while True:
if next_token: