mirror of
https://github.com/DiscreteTom/amazon-q-developer-batch-register.git
synced 2026-04-24 20:35:57 +03:00
Automate bulk user creation in AWS IAM Identity Center and subscribe them to Amazon Q Developer Pro from CSV
- Python 100%
|
|
||
|---|---|---|
| .gitignore | ||
| create_user.py | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
| subscribe.py | ||
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
- AWS Credentials - Must be configured with appropriate credentials via:
aws configurecommand- IAM roles (for EC2 instances)
- Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
- Python 3.6+
- boto3 - Install with
pip install boto3 - requests - Install with
pip install requests - Permissions - Your AWS credentials must have:
identitystore:CreateUserandidentitystore:ListUserspermissionsq:CreateAssignmentpermission
- 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 informationidentity_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 Developercreate_user.py- Module for creating IAM Identity Center userssubscribe.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
AdministratororAWSAdministrators) - 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)