Manage AWS Identity Center users and Kiro subscriptions at scale -- bulk import, password reset, and cross-account migration, all via direct API calls.
You have a list of users (e.g. a team roster) and want to:
- Create them in AWS Identity Center
- Send them password reset emails so they can log in
- Subscribe them to Kiro tiers
See: Bulk Import Workflow
You have Kiro set up in one AWS account and want to replicate the entire setup (Identity Store users, groups, memberships, and Kiro subscriptions) to another account.
See: Migration Workflow
- Python 3.10+
- AWS CLI configured with appropriate credentials
- For migration: AWS credentials for both source and target accounts (use
--profile) - IAM permissions:
identitystore:*,sso:ListInstances
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt| Script | Description |
|---|---|
idc_manager.py create-users |
Bulk create users from a CSV file |
idc_manager.py reset-password |
Send password reset emails |
idc_manager.py enrich |
Enrich a Kiro subscription export with user details |
idc_manager.py export-subscriptions |
Export Kiro subscriptions with enriched user details |
idc_manager.py export-store |
Export all users, groups, memberships from an Identity Store |
idc_manager.py import-store |
Import users, groups, memberships into another Identity Store |
kiro_subscribe.py |
Subscribe users to Kiro tiers (Pro, Pro+, Power) |
kiro_migrate.py |
One-command migration -- automates all 5 steps |
Create a CSV file with your users. See sample_users.csv:
UserName,GivenName,FamilyName,DisplayName,Email,Groups,KiroTier
jsmith,John,Smith,John Smith,jsmith@example.com,KiroUsers,Kiro Pro
jdoe,Jane,Doe,Jane Doe,jdoe@example.com,"KiroUsers,KiroAdmins",Kiro Pro+
bwilson,Bob,Wilson,Bob Wilson,bwilson@example.com,KiroUsers,Kiro PowerColumn names are flexible (case-insensitive). Supported aliases:
| Field | Accepted Column Names |
|---|---|
| UserName | UserName, username, user_name (falls back to Email) |
| GivenName | GivenName, given_name, first_name, firstname |
| FamilyName | FamilyName, family_name, last_name, lastname |
| DisplayName | DisplayName, display_name (auto-generated if omitted) |
Email, email, email_address (required) |
|
| Groups | Groups, groups, group_names (comma-separated, optional) |
| KiroTier | KiroTier, kiro_tier, tier, plan (optional) |
# Dry run first
python idc_manager.py create-users users.csv --dry-run
# Create users and send password reset emails in one step
python idc_manager.py create-users users.csv \
--region us-east-1 \
--output report.json \
--reset-passwordUsers who already exist are skipped. The --reset-password flag sends a password setup email to each newly created user immediately after creation. The password reset link expires in 1 hour. If a user misses the window, re-run idc_manager.py reset-password to send a new link.
# Per-user tier from CSV (KiroTier column)
python kiro_subscribe.py --csv users.csv --region us-east-1
# Or same tier for everyone
python kiro_subscribe.py --csv users.csv --tier "Kiro Pro+" --region us-east-1
# Or from the report (all same tier)
python kiro_subscribe.py --report report.json --tier "Kiro Pro" --region us-east-1source .venv/bin/activate
# 1. Create users + password reset
python idc_manager.py create-users users.csv \
--region us-east-1 \
--output report.json \
--reset-password
# 2. Subscribe to Kiro
python kiro_subscribe.py --csv users.csv --region us-east-1Migrate Kiro subscriptions from Account A to Account B. This copies the Identity Store (users, groups, memberships) and re-creates the Kiro subscriptions.
Before you start: Make sure Kiro is enabled in the target account. Go to the target account's AWS Console > Kiro and complete the initial setup. The CreateAssignment API will fail with AccessDeniedException if Kiro is not activated.
# Dry run -- preview what will be migrated
python kiro_migrate.py \
--source-profile source-account \
--target-profile target-account \
--region us-east-1 \
--dry-run
# Run the migration
python kiro_migrate.py \
--source-profile source-account \
--target-profile target-account \
--region us-east-1This single command automates all 5 steps:
| Step | Account | What |
|---|---|---|
| 1a | Source | Export Identity Store (users, groups, memberships) |
| 1b | Source | Export Kiro subscriptions |
| 2a | Target | Import Identity Store |
| 2b | Target | Send password reset emails |
| 3 | Target | Re-create Kiro subscriptions |
All steps are idempotent -- safe to re-run if interrupted.
| Option | Description |
|---|---|
--source-profile |
AWS CLI profile for the source account (required) |
--target-profile |
AWS CLI profile for the target account (required) |
--region, -r |
AWS region (default: us-east-1) |
--dry-run, -n |
Preview all steps without making changes |
--skip-reset-password |
Skip sending password reset emails |
--skip-subscriptions |
Skip re-creating Kiro subscriptions |
--workers, -w |
Parallel workers (default: 5) |
--verbose, -v |
Enable debug logging |
1a. Export the Identity Store (users, groups, memberships):
python idc_manager.py export-store \
--profile source-account \
--region us-east-1 \
-o identity-store-backup.json1b. Export Kiro Subscriptions (with enriched user details):
python idc_manager.py export-subscriptions \
--profile source-account \
--region us-east-1 \
-o users.csvThis calls the ListUserSubscriptions API to fetch all Kiro subscriptions, then enriches each entry with user details (name, email, groups) from the source Identity Store. The output users.csv is used in subsequent steps.
2a. Import the Identity Store (groups, users, memberships):
# Preview first
python idc_manager.py import-store identity-store-backup.json \
--profile target-account \
--region us-east-1 \
--dry-run
# Import for real
python idc_manager.py import-store identity-store-backup.json \
--profile target-account \
--region us-east-1This creates all groups, users, and memberships in the target Identity Store. Existing users/groups are skipped (idempotent). Import order: groups -> users -> memberships.
2b. Send Password Reset Emails:
Users created via API don't receive a password email. Send one to each user in the target account. The password reset link expires in 1 hour. If a user misses the window, re-run this command to send a new link:
python idc_manager.py reset-password \
--csv users.csv \
--profile target-account \
--region us-east-1Subscribe users to their Kiro tiers in the target account:
python kiro_subscribe.py \
--csv users.csv \
--profile target-account \
--region us-east-1source .venv/bin/activate
# === Source Account ===
# 1a. Export Identity Store
python idc_manager.py export-store \
--profile source-account \
--region us-east-1 \
-o identity-store-backup.json
# 1b. Export Kiro subscriptions (with user details)
python idc_manager.py export-subscriptions \
--profile source-account \
--region us-east-1 \
-o users.csv
# === Target Account ===
# 2a. Import Identity Store (groups, users, memberships)
python idc_manager.py import-store identity-store-backup.json \
--profile target-account \
--region us-east-1
# 2b. Send password reset emails
python idc_manager.py reset-password \
--csv users.csv \
--profile target-account \
--region us-east-1
# 3. Re-create Kiro subscriptions
python kiro_subscribe.py \
--csv users.csv \
--profile target-account \
--region us-east-1| Tier Name | CLI Value | CSV Value | Price | Credits |
|---|---|---|---|---|
| Kiro Pro | pro |
Kiro Pro |
$20/mo | 1,000 |
| Kiro Pro+ | pro+ |
Kiro Pro+ |
$40/mo | 2,000 |
| Kiro Power | power |
Kiro Power |
$200/mo | 10,000 |
Short aliases (pro, pro+, power) are accepted as CLI input and in CSV files. All outputs use the canonical names (Kiro Pro, Kiro Pro+, Kiro Power).
Run --help on any command for full details:
python idc_manager.py --help
python idc_manager.py create-users --help
python idc_manager.py reset-password --help
python idc_manager.py enrich --help
python idc_manager.py export-subscriptions --help
python idc_manager.py export-store --help
python idc_manager.py import-store --help
python kiro_subscribe.py --help
python kiro_migrate.py --help- Idempotent: All operations skip existing resources (users, groups, memberships, subscriptions).
- Parallel:
reset-passwordandkiro_subscribe.pysupport--workersfor parallel execution (default: 5). - No browser required: All operations use direct AWS API calls with SigV4 signing.
- Internal APIs:
reset-passwordusesSWBUPService.UpdatePassword(service:userpool).kiro_subscribe.pyusesAmazonQDeveloperService.CreateAssignment(service:q).export-subscriptionsusesAWSZornControlPlaneService.ListUserSubscriptions(service:user-subscriptions). These are internal AWS APIs discovered via network traffic analysis.
| Problem | Solution |
|---|---|
No AWS Identity Center instance found |
Enable Identity Center in the account, or specify --region |
ConflictException on user creation |
User already exists -- check the "skipped" count |
AccessDeniedException on Kiro subscription |
Kiro is not enabled in the target account. Go to AWS Console > Kiro and complete the initial setup first |
ConflictException on Kiro subscription |
User already subscribed to a tier |
HTTP 403 |
Check AWS credentials and IAM permissions |
User not found when using --csv |
Username in CSV must match the username in Identity Center |
| Invalid tier name | Use pro, pro+, power or Kiro Pro, Kiro Pro+, Kiro Power |
| Same Identity Store error on import | Use --force to import into the same store, or specify a different --identity-store-id |
MIT