Automate bulk user creation in AWS IAM Identity Center and subscribe them to Amazon Q Developer Pro from CSV
Find a file
DiscreteTom df11b7e4c7
Revise README for Amazon Q Developer Pro registration
Updated README to reflect changes in Amazon Q Developer Pro registration process.
2025-11-20 16:45:12 +08:00
.gitignore chore: add gitignore 2025-07-28 08:01:54 +00:00
create_user.py refactor: use python, also subscribe user 2025-07-28 07:17:47 +00:00
main.py refactor: use python, also subscribe user 2025-07-28 07:17:47 +00:00
README.md Revise README for Amazon Q Developer Pro registration 2025-11-20 16:45:12 +08:00
requirements.txt refactor: use python, also subscribe user 2025-07-28 07:17:47 +00:00
subscribe.py refactor: use python, also subscribe user 2025-07-28 07:17:47 +00:00

Batch Register Amazon Q Developer Pro Account

Important

Registering Amazon Q Developer Pro is no longer the recommended way to use Kiro. Please subscript to Kiro's enterprise billing directly.

This script allows you to create multiple users in AWS IAM Identity Center from a CSV file and automatically subscribe them to Amazon Q Developer.

Prerequisites

  1. AWS Credentials - Must be configured with appropriate credentials via:
    • aws configure command
    • IAM roles (for EC2 instances)
    • Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
  2. Python 3.6+
  3. boto3 - Install with pip install boto3
  4. requests - Install with pip install requests
  5. Permissions - Your AWS credentials must have:
    • identitystore:CreateUser and identitystore:ListUsers permissions
    • q:CreateAssignment permission
  6. Email OTP Configuration - Enable the "Send email OTP" setting in IAM Identity Center to allow users created via API to receive password setup emails. Follow the instructions in the AWS documentation to configure this setting.

Usage

python3 main.py <csv_file> <identity_store_id>

Parameters

  • csv_file: Path to the CSV file containing user information
  • identity_store_id: Your IAM Identity Center Identity Store ID

Example

python3 main.py sample_users.csv d-123123123

File Structure

  • main.py - Main script that creates users and subscribes them to Amazon Q Developer
  • create_user.py - Module for creating IAM Identity Center users
  • subscribe.py - Module for subscribing users to Amazon Q Developer

CSV File Format

The CSV file must have the following header (exact format):

email,username,display_name,given_name,family_name

Example CSV Content

email,username,display_name,given_name,family_name
john.doe@example.com,johndoe,John Doe,John,Doe
jane.smith@example.com,janesmith,Jane Smith,Jane,Smith
bob.wilson@example.com,bobwilson,Bob Wilson,Bob,Wilson

Field Requirements

  • email: User's email address (will be set as primary work email)
  • username: Unique username (max 128 characters, cannot be Administrator or AWSAdministrators)
  • display_name: Display name for the user
  • given_name: User's first name (required by IAM Identity Center)
  • family_name: User's last name (required by IAM Identity Center)