Landing Zone as a Service - AWS Account Factory Automation Command Line Interface
Project description
LZaaS CLI
๐ Landing Zone as a Service - Command Line Interface
A powerful CLI tool for managing AWS Account Factory (AFT) through GitOps Infrastructure as Code principles.
Overview
LZaaS CLI v1.0.0 provides a streamlined interface for:
- Account Migration Planning: Plan and preview AWS account migrations between Organizational Units
- Beautiful CLI Interface: Rich tables, animations, and comprehensive dry-run capabilities
- AWS Organizations Integration: Discover accounts and OUs automatically
- Infrastructure as Code: Generate Terraform previews and Pull Request details
- Migration Status Monitoring: Track ongoing and completed migrations
๐ Quick Start
Option 1: Install from PyPI (Recommended)
# Create and activate virtual environment
python -m venv lzaas-env
source lzaas-env/bin/activate # On Windows: lzaas-env\Scripts\activate
# Install from PyPI
pip install lzaas-cli
# Initialize configuration
lzaas config init
# Test with a dry-run migration
lzaas migrate simple --source spitzkop --target sandbox --dry-run
# Create your first account
lzaas account create --template dev --email dev@company.com --client-id your-team
Option 2: Install from Source (Development)
# Create and activate virtual environment
python -m venv lzaas-env
source lzaas-env/bin/activate # On Windows: lzaas-env\Scripts\activate
# Clone the repository
git clone https://github.com/Cloud-Cockpit/sse-landing-zone.git
cd sse-landing-zone/lzaas-cli
# Install in development mode
pip install -e .
# Using install script
./install-lzaas.sh
# Initialize configuration
lzaas config init
# Test with a dry-run migration
lzaas migrate simple --source spitzkop --target sandbox --dry-run
# Create your first account
lzaas account create --template dev --email dev@company.com --client-id your-team
Uinstall LZaaS CLI
./uninstall-lzaas.sh
๐ Documentation
- Getting Started Guide - Complete installation and setup guide
- User Guide - Comprehensive usage documentation
- Quick Reference - Command cheat sheet
See the development Installation Guide for development environment detailed setup instructions.
Technical Documentation
โจ Key Features
Beautiful Migration Planning
# Plan account migration with beautiful output
lzaas migrate simple --source spitzkop --target sandbox --dry-run
Example Output:
๐ Infrastructure as Code Account Migration
All changes will be made through Git repository updates
๐๏ธ Infrastructure as Code Migration Plan
โโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Field โ Value โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Source Account โ SPITZKOP (198610579545) โ
โ Current Location โ Root โ
โ Target OU โ Sandbox (ou-lcnt-dmpxlwlu) โ
โ Repository โ Cloud-Cockpit/sse-landing-zone โ
โ Method โ Git-based Infrastructure as Code โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Repository Changes:
~ terraform/live/account-factory/lzaas-account-198610579545.tf (create/update)
~ terraform/live/account-factory/lzaas-metadata.tf (update)
๐ DRY RUN MODE - No changes will be made
AWS Organizations Discovery
# List all available Organizational Units
lzaas migrate list-ous
# Check migration status
lzaas migrate status
Configuration Management
# Initialize configuration
lzaas config init
# Show current configuration
lzaas config show
# Validate AWS connectivity
lzaas config validate
๐ Essential Commands
Migration Commands
# Plan account migration (dry-run mode)
lzaas migrate simple --source ACCOUNT_NAME --target TARGET_OU --dry-run
# List available Organizational Units
lzaas migrate list-ous
# Check migration status
lzaas migrate status
# Filter status by account or OU
lzaas migrate status --account-id 123456789012
lzaas migrate status --ou "Development"
Configuration Commands
# Initialize configuration
lzaas config init
# Show current configuration
lzaas config show
# Validate configuration and AWS access
lzaas config validate
# Update specific configuration values
lzaas config set github.organization "your-org"
lzaas config set aws.profile "your-profile"
Account Management Commands
# Create new account request
lzaas account create --name "MyAccount" --email "admin@example.com" --ou "Development"
# List account requests
lzaas account list
# Show account request details
lzaas account show REQUEST_ID
Template Commands
# List available templates
lzaas template list
# Show template details
lzaas template show TEMPLATE_NAME
# Validate template
lzaas template validate TEMPLATE_NAME
Information Commands
# Show CLI version
lzaas --version
# Show help for any command
lzaas COMMAND --help
# Show general help
lzaas --help
๐๏ธ Architecture
LZaaS CLI v1.0.0 follows Infrastructure as Code principles:
LZaaS CLI โ AWS Organizations โ Migration Planning โ Terraform Preview โ GitHub PR (mock)
v1.0.0 Features:
- โ Complete Migration Planning: Full dry-run capabilities with beautiful output
- โ AWS Organizations Integration: Real account and OU discovery
- โ Terraform Preview Generation: Shows exact code that would be created
- โ Mock GitHub Integration: Demonstrates PR workflow without actual changes
- โ Account ID-based Naming: Terraform-compatible file naming
- โ Rich CLI Interface: Tables, animations, and progress indicators
Coming in Future Releases:
- ๐ Full GitHub Integration: Actual repository modifications and PR creation
- ๐ Advanced Migration Workflows: Complex multi-account migrations
- ๐ Enhanced Templates: More sophisticated account configurations
- ๐ Monitoring Dashboard: Real-time migration status tracking
โ๏ธ Prerequisites
- Python 3.8+ with pip
- AWS CLI configured with appropriate credentials
- AWS SSO session (if using SSO)
- AWS Organizations access in your management account
- Organizational Units configured for migration targets
๐ง Configuration
AWS Authentication
# Check AWS configuration
aws sts get-caller-identity
# If using SSO, login first
aws sso login --profile your-profile
LZaaS Configuration
# Initialize LZaaS configuration
lzaas config init
# This will prompt you for:
# - AWS profile name
# - AWS region
# - GitHub organization (for future releases)
# - Repository settings
๐ฏ Account Templates
| Template | Purpose | Security Level | Use Case |
|---|---|---|---|
dev |
Development | Standard | Feature development, testing |
staging |
Pre-production | Production-like | UAT, integration testing |
production |
Live workloads | Maximum | Production deployments |
sandbox |
Experimentation | Basic | Learning, individual testing |
๐ Troubleshooting
Common Issues
AWS Authentication Errors:
# Error: "The SSO session associated with this profile has expired"
aws sso login --profile your-profile
Permission Errors:
# Ensure your AWS user/role has these permissions:
# - organizations:ListAccounts
# - organizations:ListOrganizationalUnitsForParent
# - organizations:ListRoots
# - organizations:DescribeAccount
# - organizations:DescribeOrganizationalUnit
Configuration Issues:
# Reset configuration
rm ~/.lzaas/config.yaml
lzaas config init
Debug Mode
# Run any command with debug output
lzaas --debug migrate simple --source spitzkop --target sandbox --dry-run
๐ Support
- Getting Started: Getting Started Guide
- User Guide: Complete User Guide
- Quick Reference: Command Reference
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Access Documentation via CLI
# Complete user guide with business logic
lzaas docs user-guide
# Quick command reference
lzaas docs quick-reference
# Installation instructions
lzaas docs installation
# List all available documentation
lzaas docs list
๐ What's New in v1.0.0
- โ Beautiful CLI Interface: Rich tables, animations, and comprehensive output
- โ Complete Migration Planning: Full dry-run capabilities with Terraform previews
- โ AWS Organizations Integration: Real-time account and OU discovery
- โ Infrastructure as Code: Generate complete Terraform code and PR details
- โ Account ID-based Architecture: Terraform-compatible file naming and structure
- โ Mock GitHub Integration: Demonstrates full workflow without actual changes
- โ Comprehensive Documentation: Getting started guide and user documentation
๐ Version Information
Current Version: v1.0.0 (October 7, 2025)
Installation Methods:
- PyPI Package:
pip install lzaas-cli(gets v1.0.0) - Source Repository:
pip install -e .(gets v0.0.post19+dirty for development)
Version Display: The CLI dynamically retrieves version information, so you'll see the correct version whether installed from PyPI or source.
๐ก Pro Tip: Start with the Getting Started Guide for complete installation instructions, configuration setup, and your first migration planning session!
๐ Ready to get started? Install LZaaS CLI and plan your first account migration in minutes!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lzaas_cli-0.0.post1.tar.gz.
File metadata
- Download URL: lzaas_cli-0.0.post1.tar.gz
- Upload date:
- Size: 91.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e12228a42b283d54533d99d8ffc2cc9263dda3443b27aaaf6a8547c8cdf65a5
|
|
| MD5 |
684da00f1c77aec5d5210d983b0e18aa
|
|
| BLAKE2b-256 |
041f6233756211ac0fc89a0550af1912431dc58403137e432c7be32d67d62bac
|
File details
Details for the file lzaas_cli-0.0.post1-py3-none-any.whl.
File metadata
- Download URL: lzaas_cli-0.0.post1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72fcd10c620476c34780f730c1a26eb702c86522a0b6d6b23e395856a4f693db
|
|
| MD5 |
53286d0a02370f4ebc10c2068bdf8b1e
|
|
| BLAKE2b-256 |
424923eea8e1e942b830bfdda7867b3480d27cbce8569065e1e7cc388169b035
|