public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v3 1/3] aws: add dynamic cloud configuration support
Date: Mon,  8 Sep 2025 17:56:41 -0700	[thread overview]
Message-ID: <20250909005644.798127-2-mcgrof@kernel.org> (raw)
In-Reply-To: <20250909005644.798127-1-mcgrof@kernel.org>

Move away from static AWS kconfig files to dynamic AWS kconfig support.
We leverage AWS APIs to dynamically to generate Kconfig options for instance
types, regions, and AMIs. This ensures users always have access to current
cloud resources without having kdevops admins manually hand craft updates.
This also makes it less error prone, and lets us scale.

To generate new AWS dynamic kconfig files, one can use:

make cloud-config # takes about ~6 minutes

Regular users are not expected to have to call this. Only kdevops admins are.
This will generaed Kconfig *.generated files, which we git-ignore. If we
want to keep these, and propagate them to kdevops users through a commit,
kdevops admins can then run:

make cloud-update

This will generate kconfig *.static file which we do allow to commit.
So users are expected to reap benefit of these kconfig *.static files.
And kdevops admins are the ones who will routinely (once a month or so)
will run both:

make cloud-config
make cloud-update

The implementation generates configuration files on-demand by querying
AWS EC2 APIs. If the AWS CLI is unavailable or not configured, the system
provides hardcoded defaults through fallback functions:

  * generate_default_instance_families_kconfig()
  * generate_default_regions_kconfig()
  * generate_default_gpu_amis_kconfig()

hese return common instance types like m5, t3 and major regions, ensuring
kdevops remains functional without AWS CLI access.

We completely remove all the old AWS static files in favor for the new world
order of dynamic kconfig for cloud. This commit only removes all the
static stuff, and adds all the dynamic kconfig scripts for AWS. In the
subsequent commits we will add static files from a system that does have a
functional aws cli.

New files:
- scripts/aws-cli: CLI wrapper for AWS operations
- scripts/aws_api.py: AWS API functions with fallback defaults
- docs/cloud-configuration.md: Setup and usage documentation

Changes:
- terraform/aws/kconfigs/: Dynamic Kconfig generation replaces static files
- scripts/generate_cloud_configs.py: Parallelize cloud kconfig
  generation support to reduce the time it takes
- scripts/dynamic-cloud-kconfig.Makefile: Build system integration

Prerequisites for full functionality:
- AWS CLI installed (pip install awscli)
- AWS credentials configured (~/.aws/credentials or environment variables)
- IAM permissions: ec2:Describe*, pricing:GetProducts (optional)

Without these prerequisites, kdevops uses built-in fallback functions.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 .gitignore                                    |    3 +
 docs/cloud-configuration.md                   |  533 ++++++++
 docs/kdevops-terraform.md                     |    9 +
 scripts/aws-cli                               |  436 +++++++
 scripts/aws_api.py                            | 1161 +++++++++++++++++
 scripts/dynamic-cloud-kconfig.Makefile        |   88 +-
 scripts/generate_cloud_configs.py             |  193 ++-
 terraform/aws/kconfigs/Kconfig.compute        |   93 +-
 terraform/aws/kconfigs/Kconfig.location       |  690 +---------
 .../aws/kconfigs/instance-types/Kconfig.c7a   |   28 -
 .../aws/kconfigs/instance-types/Kconfig.i4i   |   33 -
 .../aws/kconfigs/instance-types/Kconfig.im4gn |   25 -
 .../kconfigs/instance-types/Kconfig.is4gen    |   25 -
 .../aws/kconfigs/instance-types/Kconfig.m5    |   48 -
 .../aws/kconfigs/instance-types/Kconfig.m7a   |   57 -
 15 files changed, 2430 insertions(+), 992 deletions(-)
 create mode 100644 docs/cloud-configuration.md
 create mode 100755 scripts/aws-cli
 create mode 100755 scripts/aws_api.py
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.c7a
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.i4i
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.im4gn
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.is4gen
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.m5
 delete mode 100644 terraform/aws/kconfigs/instance-types/Kconfig.m7a

diff --git a/.gitignore b/.gitignore
index 720c94b6..3ad57e22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -117,3 +117,6 @@ terraform/lambdalabs/.terraform_api_key
 .cloud.initialized
 
 scripts/__pycache__/
+.aws_cloud_config_generated
+terraform/aws/kconfigs/*.generated
+terraform/aws/kconfigs/instance-types/*.generated
diff --git a/docs/cloud-configuration.md b/docs/cloud-configuration.md
new file mode 100644
index 00000000..e330daef
--- /dev/null
+++ b/docs/cloud-configuration.md
@@ -0,0 +1,533 @@
+# Cloud Configuration Management in kdevops
+
+kdevops supports dynamic cloud provider configuration, allowing administrators to generate up-to-date instance types, locations, and AMI options directly from cloud provider APIs. Since generating these configurations can take several minutes (approximately 6 minutes for AWS), kdevops implements a two-tier system to optimize the user experience.
+
+## Overview
+
+The cloud configuration system dynamically generates configuration options by querying cloud provider APIs. This approach provides:
+
+- **Always up-to-date options** from cloud provider APIs
+- **Automatic discovery** of new instance types and regions
+- **No manual maintenance** of configuration files
+- **Fallback defaults** when cloud CLI tools are unavailable
+
+## Prerequisites for Cloud Providers
+
+Before configuring dynamic cloud options, ensure you have Terraform properly set up
+for your chosen cloud provider. For general Terraform setup and cloud provider
+configuration instructions, see the [Terraform Support documentation](kdevops-terraform.md).
+
+### AWS Prerequisites
+
+The AWS dynamic configuration system uses the official AWS CLI tool and requires proper authentication to access AWS APIs.
+
+#### Requirements
+
+1. **AWS CLI Installation**
+   ```bash
+   # Using pip
+   pip install awscli
+
+   # On Debian/Ubuntu
+   sudo apt-get install awscli
+
+   # On Fedora/RHEL
+   sudo dnf install aws-cli
+
+   # On macOS
+   brew install awscli
+   ```
+
+2. **AWS Credentials Configuration**
+
+   You need valid AWS credentials configured in one of these ways:
+
+   a. **AWS credentials file** (`~/.aws/credentials`):
+   ```ini
+   [default]
+   aws_access_key_id = YOUR_ACCESS_KEY
+   aws_secret_access_key = YOUR_SECRET_KEY
+   ```
+
+   b. **Environment variables**:
+   ```bash
+   export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
+   export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
+   export AWS_DEFAULT_REGION=us-east-1  # Optional
+   ```
+
+   c. **IAM Instance Role** (when running on EC2):
+   - Automatically uses instance metadata service
+   - No explicit credentials needed
+
+3. **Required AWS Permissions**
+
+   The IAM user or role needs the following read-only permissions:
+   ```json
+   {
+     "Version": "2012-10-17",
+     "Statement": [
+       {
+         "Effect": "Allow",
+         "Action": [
+           "ec2:DescribeRegions",
+           "ec2:DescribeAvailabilityZones",
+           "ec2:DescribeInstanceTypes",
+           "ec2:DescribeImages",
+           "pricing:GetProducts"
+         ],
+         "Resource": "*"
+       },
+       {
+         "Effect": "Allow",
+         "Action": [
+           "sts:GetCallerIdentity"
+         ],
+         "Resource": "*"
+       }
+     ]
+   }
+   ```
+
+#### Verifying AWS Setup
+
+Test your AWS CLI configuration:
+```bash
+# Check AWS CLI is installed
+aws --version
+
+# Verify credentials are configured
+aws sts get-caller-identity
+
+# Test EC2 access
+aws ec2 describe-regions --output table
+```
+
+#### Fallback Behavior
+
+If AWS CLI is not available or credentials are not configured:
+- The system automatically uses fallback functions in `scripts/aws_api.py`:
+  - `generate_default_instance_families_kconfig()` - provides M5, M7a, T3, C5, I4i families
+  - `generate_default_regions_kconfig()` - provides common regions (us-east-1, eu-west-1, etc.)
+  - `generate_default_gpu_amis_kconfig()` - provides standard GPU AMI options
+- kdevops remains fully functional for AWS deployments without AWS CLI
+- Users simply get a limited but functional set of hardcoded options instead of
+  the full list from AWS APIs
+
+### Lambda Labs Prerequisites
+
+Lambda Labs configuration requires an API key:
+
+1. **Obtain API Key**: Sign up at [Lambda Labs](https://lambdalabs.com) and generate an API key
+
+2. **Configure API Key**:
+   ```bash
+   export LAMBDA_API_KEY=your_api_key_here
+   ```
+
+3. **Fallback Behavior**: Without an API key, default GPU instance types are provided
+
+## Configuration Generation Flow
+
+```
+Cloud Provider API → Generated Files → Kconfig System
+       ↑                    ↑
+  make cloud-config   (automatic)
+```
+
+## Available Targets
+
+### `make cloud-config`
+
+Generates dynamic cloud configurations by querying cloud provider APIs.
+
+**Purpose**: Fetches current instance types, regions, availability zones, and AMI options from cloud providers.
+
+**Usage**:
+```bash
+make cloud-config
+```
+
+**What it does**:
+- Queries AWS EC2 API for all available instance types and their specifications
+- Fetches current regions and availability zones
+- Discovers available AMIs including GPU-optimized images
+- Generates Kconfig files with all discovered options
+- Creates `.generated` files in provider-specific directories
+- Sets a marker file (`.aws_cloud_config_generated`) to enable dynamic config
+
+**Time required**: Approximately 6 minutes for AWS (similar for other providers)
+
+**Generated files**:
+- `terraform/aws/kconfigs/Kconfig.compute.generated`
+- `terraform/aws/kconfigs/Kconfig.location.generated`
+- `terraform/aws/kconfigs/Kconfig.gpu-amis.generated`
+- `terraform/aws/kconfigs/instance-types/Kconfig.*.generated`
+- Similar files for other cloud providers
+
+### `make clean-cloud-config`
+
+Removes all generated cloud configuration files.
+
+**Usage**:
+```bash
+make clean-cloud-config
+```
+
+**What it does**:
+- Removes all `.generated` files
+- Removes cloud initialization marker files
+- Forces regeneration on next `make cloud-config`
+
+## Usage Workflow
+
+### For All Users
+
+The cloud configuration system automatically generates options when needed:
+
+1. **Initial setup** (first time only):
+   ```bash
+   make cloud-config    # Generate cloud configurations (~6 minutes for AWS)
+   ```
+
+2. **Regular usage**:
+   ```bash
+   make menuconfig     # Cloud options are available
+   make defconfig-aws-large
+   make
+   ```
+
+### Fallback Behavior
+
+If cloud CLI tools are not available or API access fails:
+- Fallback functions in the API scripts provide hardcoded defaults:
+  - AWS: `generate_default_*_kconfig()` functions in `scripts/aws_api.py`
+  - Lambda Labs: Similar fallback functions for GPU instances
+- Common instance types (M5, T3, etc.) and major regions remain available
+- Full deployment functionality continues to work
+- Users can still configure and deploy, just with a smaller set of options
+- No error occurs - the system seamlessly falls back to these functions
+
+## How It Works
+
+### Implementation Architecture
+
+The cloud configuration system consists of several key components:
+
+1. **API Wrapper Scripts** (`scripts/aws-cli`, `scripts/lambda-cli`):
+   - Provide CLI interfaces to cloud provider APIs
+   - Handle authentication and error checking
+   - Format API responses for Kconfig generation
+
+2. **API Libraries** (`scripts/aws_api.py`, `scripts/lambdalabs_api.py`):
+   - Core functions for API interactions
+   - Generate Kconfig syntax from API data
+   - Fallback functions (`generate_default_*_kconfig()`) provide hardcoded
+     defaults when APIs unavailable
+
+3. **Generation Orchestrator** (`scripts/generate_cloud_configs.py`):
+   - Coordinates parallel generation across providers
+   - Provides summary information
+   - Handles errors gracefully
+
+4. **Makefile Integration** (`scripts/dynamic-cloud-kconfig.Makefile`):
+   - Defines make targets
+   - Manages file dependencies
+   - Handles cleanup and updates
+
+### AWS Implementation Details
+
+The AWS implementation wraps the official AWS CLI tool rather than implementing its own API client:
+
+```python
+# scripts/aws_api.py
+def run_aws_command(command: List[str], region: str = None) -> Optional[Any]:
+    cmd = ["aws"] + command + ["--output", "json"]
+    # ... executes via subprocess
+```
+
+Key features:
+- **Parallel Generation**: Uses ThreadPoolExecutor to generate instance family files concurrently
+- **GPU Detection**: Automatically identifies GPU instances and enables GPU AMI options
+- **Categorized Instance Types**: Groups instances by use case (general, compute, memory, etc.)
+- **Pricing Integration**: Queries pricing API when available
+- **Smart Defaults**: Falls back to hardcoded defaults when API unavailable, ensuring kdevops always works
+
+### Dynamic Configuration System
+
+kdevops uses dynamic configuration to provide up-to-date cloud options:
+
+- **Generated files** (`.generated`) are created by `make cloud-config`
+- Files are sourced directly by the Kconfig system
+- If generation fails or APIs are unavailable, fallback defaults are provided automatically
+
+The system is designed to be simple and automatic - run `make cloud-config` once
+to generate configurations, then use them with `make menuconfig`.
+
+### Instance Type Organization
+
+Instance types are organized by family for better navigation:
+
+```
+terraform/aws/kconfigs/instance-types/
+├── Kconfig.m5.static       # M5 family instances
+├── Kconfig.m7a.static      # M7a family instances
+├── Kconfig.g6e.static      # G6E GPU instances
+└── ...                     # Other families
+```
+
+## Supported Cloud Providers
+
+### AWS
+- **Instance types**: All EC2 instance families and sizes
+- **Regions**: All AWS regions and availability zones
+- **AMIs**: Standard distributions and GPU-optimized Deep Learning AMIs
+- **Time to generate**: ~6 minutes
+
+### Azure
+- **Instance types**: All Azure VM sizes
+- **Regions**: All Azure regions
+- **Images**: Standard and specialized images
+- **Time to generate**: ~5-7 minutes
+
+### Google Cloud (GCE)
+- **Instance types**: All GCE machine types
+- **Regions**: All GCE regions and zones
+- **Images**: Public and custom images
+- **Time to generate**: ~5-7 minutes
+
+### Lambda Labs
+- **Instance types**: GPU-optimized instances
+- **Regions**: Available data centers
+- **Images**: ML-optimized images
+- **Time to generate**: ~1-2 minutes
+
+## Benefits
+
+### For Regular Users
+- **Instant configuration** - No waiting for API queries
+- **No cloud CLI required** - Works without AWS CLI, gcloud, or Azure CLI
+- **Consistent experience** - Same options for all users
+- **Offline capable** - Works without internet access
+
+### For Administrators
+- **Centralized updates** - Update once for all users
+- **Version control** - Track configuration changes over time
+- **Reduced API calls** - Query once, use many times
+- **Flexibility** - Can still generate fresh configs when needed
+
+## Best Practices
+
+1. **Update regularly**: Cloud administrators should regenerate configurations monthly or when significant changes occur
+
+2. **Document updates**: Include cloud CLI version and date in commit messages
+
+3. **Test before committing**: Verify generated configurations work correctly:
+   ```bash
+   make cloud-config
+   make menuconfig    # Test that options appear correctly
+   ```
+
+4. **Use defconfigs**: Create defconfigs for common cloud configurations:
+   ```bash
+   make savedefconfig
+   cp defconfig defconfigs/aws-gpu-large
+   ```
+
+5. **Handle errors gracefully**: If cloud-config fails, static files still work
+
+## Troubleshooting
+
+### Configuration not appearing in menuconfig
+
+Check if dynamic config is enabled:
+```bash
+ls -la .aws_cloud_config_generated
+grep USE_DYNAMIC_CONFIG .config
+```
+
+### Generated files missing
+
+Run `make cloud-config` to generate the configuration files.
+
+### Old instance types appearing
+
+Regenerate configurations:
+```bash
+make clean-cloud-config
+make cloud-config
+```
+
+## Troubleshooting
+
+### AWS Issues
+
+#### "AWS CLI not found" Error
+```bash
+# Verify AWS CLI installation
+which aws
+aws --version
+
+# Install if missing (see Prerequisites section)
+```
+
+#### "Credentials not configured" Error
+```bash
+# Check current identity
+aws sts get-caller-identity
+
+# If fails, configure credentials:
+aws configure
+# OR
+export AWS_ACCESS_KEY_ID=your_key
+export AWS_SECRET_ACCESS_KEY=your_secret
+```
+
+#### "Access Denied" Errors
+- Verify your IAM user/role has the required permissions (see Prerequisites)
+- Check if you're in the correct AWS account
+- Ensure your credentials haven't expired
+
+#### Slow Generation Times
+- Normal for AWS (6+ minutes due to API pagination)
+- Generation only needed once, then configs are cached
+- Run generation during off-peak hours
+
+#### Missing Instance Types
+```bash
+# Force regeneration
+make clean-cloud-config
+make cloud-config
+```
+
+### General Issues
+
+#### Generated Files Not Loading
+```bash
+# Verify generated files exist
+ls terraform/aws/kconfigs/*.generated
+
+# If missing, regenerate:
+make cloud-config
+```
+
+#### Changes Not Reflected in Menuconfig
+```bash
+# Clear Kconfig cache
+make mrproper
+make menuconfig
+```
+
+#### Debugging API Calls
+```bash
+# Enable debug output
+export DEBUG=1
+make cloud-config
+
+# Test API directly
+scripts/aws-cli --output json regions list
+scripts/aws-cli --output json instance-types list --family m5
+```
+
+## Best Practices
+
+1. **Regular Updates**: Administrators should regenerate configurations monthly or when new instance types are announced
+
+2. **Commit Messages**: Include generation date and tool versions when committing static files:
+   ```bash
+   git commit -m "cloud: update AWS static configurations
+
+   Generated with AWS CLI 2.15.0 on 2024-01-15
+   - Added new G6e instance family
+   - Updated GPU AMI options
+   - 127 instance families now available"
+   ```
+
+3. **Testing**: Always test generated configurations before committing:
+   ```bash
+   make cloud-config
+
+   make menuconfig  # Verify options appear correctly
+   ```
+
+4. **Partial Generation**: For faster testing, generate only specific providers:
+   ```bash
+   make cloud-config-aws      # AWS only
+   make cloud-config-lambdalabs  # Lambda Labs only
+   ```
+
+5. **CI/CD Integration**: Consider automating configuration updates in CI pipelines
+
+## Advanced Usage
+
+### Custom AWS Profiles
+```bash
+# Use non-default AWS profile
+export AWS_PROFILE=myprofile
+make cloud-config
+```
+
+### Specific Region Generation
+```bash
+# Generate for specific region (affects default selections)
+export AWS_DEFAULT_REGION=eu-west-1
+make cloud-config
+```
+
+### Parallel Generation
+The system automatically uses parallel processing:
+- AWS: Up to 10 concurrent instance family generations
+- Reduces total generation time significantly
+
+## File Reference
+
+### AWS Files
+- `terraform/aws/kconfigs/Kconfig.compute.{generated,static}` - Instance families
+- `terraform/aws/kconfigs/Kconfig.location.{generated,static}` - Regions and zones
+- `terraform/aws/kconfigs/Kconfig.gpu-amis.{generated,static}` - GPU AMI options
+- `terraform/aws/kconfigs/instance-types/Kconfig.*.{generated,static}` - Per-family sizes
+
+### Marker Files
+- `.aws_cloud_config_generated` - Enables dynamic AWS config
+- `.cloud.initialized` - General cloud config marker
+
+### Scripts
+- `scripts/aws-cli` - AWS CLI wrapper with user-friendly commands
+- `scripts/aws_api.py` - AWS API library and Kconfig generation
+- `scripts/generate_cloud_configs.py` - Main orchestrator for all providers
+- `scripts/dynamic-cloud-kconfig.Makefile` - Make targets and integration
+
+## Implementation Details
+
+The cloud configuration system is implemented using:
+
+- **AWS CLI Wrapper**: Uses official AWS CLI via subprocess calls
+- **Parallel Processing**: ThreadPoolExecutor for concurrent API calls
+- **Fallback Defaults**: Pre-defined configurations when API unavailable
+- **Two-tier System**: Generated (dynamic) → Static (committed) files
+- **Kconfig Integration**: Seamless integration with Linux kernel-style configuration
+
+### Key Design Decisions
+
+1. **Why wrap AWS CLI instead of using boto3?**
+   - Reduces dependencies (AWS CLI often already installed)
+   - Leverages AWS's official tool and authentication methods
+   - Simpler credential management (uses standard AWS config)
+
+2. **Why the two-tier system?**
+   - Fast loading for regular users (no API calls needed)
+   - Fresh data when administrators regenerate
+   - Works offline and in restricted environments
+
+3. **Why 6 minutes generation time?**
+   - AWS API pagination limits (100 items per request)
+   - Comprehensive data collection (all regions, all instance types)
+   - Parallel processing already optimized
+
+## See Also
+
+- [AWS Instance Types](https://aws.amazon.com/ec2/instance-types/)
+- [Azure VM Sizes](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes)
+- [GCE Machine Types](https://cloud.google.com/compute/docs/machine-types)
+- [kdevops Terraform Documentation](terraform.md)
+- [AWS CLI Documentation](https://docs.aws.amazon.com/cli/)
diff --git a/docs/kdevops-terraform.md b/docs/kdevops-terraform.md
index 3291444d..983dbad5 100644
--- a/docs/kdevops-terraform.md
+++ b/docs/kdevops-terraform.md
@@ -33,6 +33,15 @@ That should let you start configuring your cloud provider options. You can
 use the same main menu to configure specific workflows supported by kdevops,
 by defaults no workflows are enabled, and so all you get is the bringup.
 
+### Dynamic Cloud Configuration
+
+kdevops supports dynamic cloud provider configuration that queries live cloud
+APIs for up-to-date instance types, regions, and AMI options. This feature
+ensures you always have access to the latest cloud resources without manual
+updates. For detailed information about dynamic cloud configuration, including
+setup, prerequisites, and advanced usage, see the
+[Cloud Configuration Management documentation](cloud-configuration.md).
+
 ## Installing dependencies
 
 To install the dependencies of everything which you just enabled just run:
diff --git a/scripts/aws-cli b/scripts/aws-cli
new file mode 100755
index 00000000..6cacce8b
--- /dev/null
+++ b/scripts/aws-cli
@@ -0,0 +1,436 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: MIT
+"""
+AWS CLI tool for kdevops
+
+A structured CLI tool that wraps AWS CLI commands and provides access to
+AWS cloud provider functionality for dynamic configuration generation
+and resource management.
+"""
+
+import argparse
+import json
+import sys
+import os
+from typing import Dict, List, Any, Optional, Tuple
+from pathlib import Path
+
+# Import the AWS API functions
+try:
+    from aws_api import (
+        check_aws_cli,
+        get_instance_types,
+        get_regions,
+        get_availability_zones,
+        get_pricing_info,
+        generate_instance_types_kconfig,
+        generate_regions_kconfig,
+        generate_instance_families_kconfig,
+        generate_gpu_amis_kconfig,
+    )
+except ImportError:
+    # Try to import from scripts directory if not in path
+    sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
+    from aws_api import (
+        check_aws_cli,
+        get_instance_types,
+        get_regions,
+        get_availability_zones,
+        get_pricing_info,
+        generate_instance_types_kconfig,
+        generate_regions_kconfig,
+        generate_instance_families_kconfig,
+        generate_gpu_amis_kconfig,
+    )
+
+
+class AWSCLI:
+    """AWS CLI interface for kdevops"""
+
+    def __init__(self, output_format: str = "json"):
+        """
+        Initialize the CLI with specified output format
+
+        Args:
+            output_format: 'json' or 'text' for output formatting
+        """
+        self.output_format = output_format
+        self.aws_available = check_aws_cli()
+
+    def output(self, data: Any, headers: Optional[List[str]] = None):
+        """
+        Output data in the specified format
+
+        Args:
+            data: Data to output (dict, list, or primitive)
+            headers: Column headers for text format (optional)
+        """
+        if self.output_format == "json":
+            print(json.dumps(data, indent=2))
+        else:
+            # Human-readable text format
+            if isinstance(data, list):
+                if data and isinstance(data[0], dict):
+                    # Table format for list of dicts
+                    if not headers:
+                        headers = list(data[0].keys()) if data else []
+
+                    if headers:
+                        # Calculate column widths
+                        widths = {h: len(h) for h in headers}
+                        for item in data:
+                            for h in headers:
+                                val = str(item.get(h, ""))
+                                widths[h] = max(widths[h], len(val))
+
+                        # Print header
+                        header_line = " | ".join(h.ljust(widths[h]) for h in headers)
+                        print(header_line)
+                        print("-" * len(header_line))
+
+                        # Print rows
+                        for item in data:
+                            row = " | ".join(
+                                str(item.get(h, "")).ljust(widths[h]) for h in headers
+                            )
+                            print(row)
+                else:
+                    # Simple list
+                    for item in data:
+                        print(item)
+            elif isinstance(data, dict):
+                # Key-value format
+                max_key_len = max(len(k) for k in data.keys()) if data else 0
+                for key, value in data.items():
+                    print(f"{key.ljust(max_key_len)} : {value}")
+            else:
+                # Simple value
+                print(data)
+
+    def list_instance_types(
+        self,
+        family: Optional[str] = None,
+        region: Optional[str] = None,
+        max_results: int = 100,
+    ) -> List[Dict[str, Any]]:
+        """
+        List instance types
+
+        Args:
+            family: Filter by instance family (e.g., 'm5', 't3')
+            region: AWS region to query
+            max_results: Maximum number of results to return
+
+        Returns:
+            List of instance type information
+        """
+        if not self.aws_available:
+            return [
+                {
+                    "error": "AWS CLI not found. Please install AWS CLI and configure credentials."
+                }
+            ]
+
+        instances = get_instance_types(
+            family=family, region=region, max_results=max_results
+        )
+
+        # Format the results
+        result = []
+        for instance in instances:
+            item = {
+                "name": instance.get("InstanceType", ""),
+                "vcpu": instance.get("VCpuInfo", {}).get("DefaultVCpus", 0),
+                "memory_gb": instance.get("MemoryInfo", {}).get("SizeInMiB", 0) / 1024,
+                "instance_storage": instance.get("InstanceStorageSupported", False),
+                "network_performance": instance.get("NetworkInfo", {}).get(
+                    "NetworkPerformance", ""
+                ),
+                "architecture": ", ".join(
+                    instance.get("ProcessorInfo", {}).get("SupportedArchitectures", [])
+                ),
+            }
+            result.append(item)
+
+        # Sort by name
+        result.sort(key=lambda x: x["name"])
+
+        return result
+
+    def list_regions(self, include_zones: bool = False) -> List[Dict[str, Any]]:
+        """
+        List regions
+
+        Args:
+            include_zones: Include availability zones for each region
+
+        Returns:
+            List of region information
+        """
+        if not self.aws_available:
+            return [
+                {
+                    "error": "AWS CLI not found. Please install AWS CLI and configure credentials."
+                }
+            ]
+
+        regions = get_regions()
+
+        result = []
+        for region in regions:
+            item = {
+                "name": region.get("RegionName", ""),
+                "endpoint": region.get("Endpoint", ""),
+                "opt_in_status": region.get("OptInStatus", ""),
+            }
+
+            if include_zones:
+                # Get availability zones for this region
+                zones = get_availability_zones(region["RegionName"])
+                item["zones"] = len(zones)
+                item["zone_names"] = ", ".join([z["ZoneName"] for z in zones])
+
+            result.append(item)
+
+        return result
+
+    def get_cheapest_instance(
+        self,
+        region: Optional[str] = None,
+        family: Optional[str] = None,
+        min_vcpus: int = 2,
+    ) -> Dict[str, Any]:
+        """
+        Get the cheapest instance meeting criteria
+
+        Args:
+            region: AWS region
+            family: Instance family filter
+            min_vcpus: Minimum number of vCPUs required
+
+        Returns:
+            Dictionary with instance information
+        """
+        if not self.aws_available:
+            return {"error": "AWS CLI not available"}
+
+        instances = get_instance_types(family=family, region=region)
+
+        # Filter by minimum vCPUs
+        eligible = []
+        for instance in instances:
+            vcpus = instance.get("VCpuInfo", {}).get("DefaultVCpus", 0)
+            if vcpus >= min_vcpus:
+                eligible.append(instance)
+
+        if not eligible:
+            return {"error": "No instances found matching criteria"}
+
+        # Get pricing for eligible instances
+        pricing = get_pricing_info(region=region or "us-east-1")
+
+        # Find cheapest
+        cheapest = None
+        cheapest_price = float("inf")
+
+        for instance in eligible:
+            instance_type = instance.get("InstanceType")
+            price = pricing.get(instance_type, {}).get("on_demand", float("inf"))
+            if price < cheapest_price:
+                cheapest_price = price
+                cheapest = instance
+
+        if cheapest:
+            return {
+                "instance_type": cheapest.get("InstanceType"),
+                "vcpus": cheapest.get("VCpuInfo", {}).get("DefaultVCpus", 0),
+                "memory_gb": cheapest.get("MemoryInfo", {}).get("SizeInMiB", 0) / 1024,
+                "price_per_hour": f"${cheapest_price:.3f}",
+            }
+
+        return {"error": "Could not determine cheapest instance"}
+
+    def generate_kconfig(self) -> bool:
+        """
+        Generate Kconfig files for AWS
+
+        Returns:
+            True on success, False on failure
+        """
+        if not self.aws_available:
+            print("AWS CLI not available, cannot generate Kconfig", file=sys.stderr)
+            return False
+
+        output_dir = Path("terraform/aws/kconfigs")
+
+        # Create directory if it doesn't exist
+        output_dir.mkdir(parents=True, exist_ok=True)
+
+        try:
+            from concurrent.futures import ThreadPoolExecutor, as_completed
+
+            # Generate files in parallel
+            instance_types_dir = output_dir / "instance-types"
+            instance_types_dir.mkdir(exist_ok=True)
+
+            def generate_family_file(family):
+                """Generate Kconfig for a single family."""
+                types_kconfig = generate_instance_types_kconfig(family)
+                if types_kconfig:
+                    types_file = instance_types_dir / f"Kconfig.{family}.generated"
+                    types_file.write_text(types_kconfig)
+                    return f"Generated {types_file}"
+                return None
+
+            with ThreadPoolExecutor(max_workers=10) as executor:
+                # Submit all generation tasks
+                futures = []
+
+                # Generate instance families Kconfig
+                futures.append(executor.submit(generate_instance_families_kconfig))
+
+                # Generate regions Kconfig
+                futures.append(executor.submit(generate_regions_kconfig))
+
+                # Generate GPU AMIs Kconfig
+                futures.append(executor.submit(generate_gpu_amis_kconfig))
+
+                # Generate instance types for each family
+                # Get all families dynamically from AWS
+                from aws_api import get_generated_instance_families
+
+                families = get_generated_instance_families()
+
+                family_futures = []
+                for family in sorted(families):
+                    family_futures.append(executor.submit(generate_family_file, family))
+
+                # Process main config results
+                families_kconfig = futures[0].result()
+                regions_kconfig = futures[1].result()
+                gpu_amis_kconfig = futures[2].result()
+
+                # Write main configs
+                families_file = output_dir / "Kconfig.compute.generated"
+                families_file.write_text(families_kconfig)
+                print(f"Generated {families_file}")
+
+                regions_file = output_dir / "Kconfig.location.generated"
+                regions_file.write_text(regions_kconfig)
+                print(f"Generated {regions_file}")
+
+                gpu_amis_file = output_dir / "Kconfig.gpu-amis.generated"
+                gpu_amis_file.write_text(gpu_amis_kconfig)
+                print(f"Generated {gpu_amis_file}")
+
+                # Process family results
+                for future in family_futures:
+                    result = future.result()
+                    if result:
+                        print(result)
+
+            return True
+
+        except Exception as e:
+            print(f"Error generating Kconfig: {e}", file=sys.stderr)
+            return False
+
+
+def main():
+    """Main entry point"""
+    parser = argparse.ArgumentParser(
+        description="AWS CLI tool for kdevops",
+        formatter_class=argparse.RawDescriptionHelpFormatter,
+    )
+
+    parser.add_argument(
+        "--output",
+        choices=["json", "text"],
+        default="json",
+        help="Output format (default: json)",
+    )
+
+    subparsers = parser.add_subparsers(dest="command", help="Available commands")
+
+    # Generate Kconfig command
+    kconfig_parser = subparsers.add_parser(
+        "generate-kconfig", help="Generate Kconfig files for AWS"
+    )
+
+    # Instance types command
+    instances_parser = subparsers.add_parser(
+        "instance-types", help="Manage instance types"
+    )
+    instances_subparsers = instances_parser.add_subparsers(
+        dest="subcommand", help="Instance type operations"
+    )
+
+    # Instance types list
+    list_instances = instances_subparsers.add_parser("list", help="List instance types")
+    list_instances.add_argument("--family", help="Filter by instance family")
+    list_instances.add_argument("--region", help="AWS region")
+    list_instances.add_argument(
+        "--max-results", type=int, default=100, help="Maximum results (default: 100)"
+    )
+
+    # Regions command
+    regions_parser = subparsers.add_parser("regions", help="Manage regions")
+    regions_subparsers = regions_parser.add_subparsers(
+        dest="subcommand", help="Region operations"
+    )
+
+    # Regions list
+    list_regions = regions_subparsers.add_parser("list", help="List regions")
+    list_regions.add_argument(
+        "--include-zones",
+        action="store_true",
+        help="Include availability zones",
+    )
+
+    # Cheapest instance command
+    cheapest_parser = subparsers.add_parser(
+        "cheapest", help="Find cheapest instance meeting criteria"
+    )
+    cheapest_parser.add_argument("--region", help="AWS region")
+    cheapest_parser.add_argument("--family", help="Instance family")
+    cheapest_parser.add_argument(
+        "--min-vcpus", type=int, default=2, help="Minimum vCPUs (default: 2)"
+    )
+
+    args = parser.parse_args()
+
+    cli = AWSCLI(output_format=args.output)
+
+    if args.command == "generate-kconfig":
+        success = cli.generate_kconfig()
+        sys.exit(0 if success else 1)
+
+    elif args.command == "instance-types":
+        if args.subcommand == "list":
+            instances = cli.list_instance_types(
+                family=args.family,
+                region=args.region,
+                max_results=args.max_results,
+            )
+            cli.output(instances)
+
+    elif args.command == "regions":
+        if args.subcommand == "list":
+            regions = cli.list_regions(include_zones=args.include_zones)
+            cli.output(regions)
+
+    elif args.command == "cheapest":
+        result = cli.get_cheapest_instance(
+            region=args.region,
+            family=args.family,
+            min_vcpus=args.min_vcpus,
+        )
+        cli.output(result)
+
+    else:
+        parser.print_help()
+        sys.exit(1)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/scripts/aws_api.py b/scripts/aws_api.py
new file mode 100755
index 00000000..a9180b31
--- /dev/null
+++ b/scripts/aws_api.py
@@ -0,0 +1,1161 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: MIT
+"""
+AWS API library for kdevops.
+
+Provides AWS CLI wrapper functions for dynamic configuration generation.
+Used by aws-cli and other kdevops components.
+"""
+
+import json
+import os
+import re
+import subprocess
+import sys
+from typing import Dict, List, Optional, Any
+
+
+def check_aws_cli() -> bool:
+    """Check if AWS CLI is installed and configured."""
+    try:
+        # Check if AWS CLI is installed
+        result = subprocess.run(
+            ["aws", "--version"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+        if result.returncode != 0:
+            return False
+
+        # Check if credentials are configured
+        result = subprocess.run(
+            ["aws", "sts", "get-caller-identity"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+        return result.returncode == 0
+    except FileNotFoundError:
+        return False
+
+
+def get_default_region() -> str:
+    """Get the default AWS region from configuration or environment."""
+    # Try to get from environment
+    region = os.environ.get("AWS_DEFAULT_REGION")
+    if region:
+        return region
+
+    # Try to get from AWS config
+    try:
+        result = subprocess.run(
+            ["aws", "configure", "get", "region"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+        if result.returncode == 0 and result.stdout.strip():
+            return result.stdout.strip()
+    except (subprocess.SubprocessError, FileNotFoundError):
+        pass
+
+    # Default to us-east-1
+    return "us-east-1"
+
+
+def run_aws_command(command: List[str], region: Optional[str] = None) -> Optional[Dict]:
+    """
+    Run an AWS CLI command and return the JSON output.
+
+    Args:
+        command: AWS CLI command as a list
+        region: Optional AWS region
+
+    Returns:
+        Parsed JSON output or None on error
+    """
+    cmd = ["aws"] + command + ["--output", "json"]
+
+    # Always specify a region (use default if not provided)
+    if not region:
+        region = get_default_region()
+    cmd.extend(["--region", region])
+
+    try:
+        result = subprocess.run(
+            cmd,
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+        if result.returncode == 0:
+            return json.loads(result.stdout) if result.stdout else {}
+        else:
+            print(f"AWS command failed: {result.stderr}", file=sys.stderr)
+            return None
+    except (subprocess.SubprocessError, json.JSONDecodeError) as e:
+        print(f"Error running AWS command: {e}", file=sys.stderr)
+        return None
+
+
+def get_regions() -> List[Dict[str, Any]]:
+    """Get available AWS regions."""
+    response = run_aws_command(["ec2", "describe-regions"])
+    if response and "Regions" in response:
+        return response["Regions"]
+    return []
+
+
+def get_availability_zones(region: str) -> List[Dict[str, Any]]:
+    """Get availability zones for a specific region."""
+    response = run_aws_command(
+        ["ec2", "describe-availability-zones"],
+        region=region,
+    )
+    if response and "AvailabilityZones" in response:
+        return response["AvailabilityZones"]
+    return []
+
+
+def get_instance_types(
+    family: Optional[str] = None,
+    region: Optional[str] = None,
+    max_results: int = 100,
+    fetch_all: bool = True,
+) -> List[Dict[str, Any]]:
+    """
+    Get available instance types.
+
+    Args:
+        family: Instance family filter (e.g., 'm5', 't3')
+        region: AWS region
+        max_results: Maximum number of results per API call (max 100)
+        fetch_all: If True, fetch all pages using NextToken pagination
+
+    Returns:
+        List of instance type information
+    """
+    all_instances = []
+    next_token = None
+    page_count = 0
+
+    # Ensure max_results doesn't exceed AWS limit
+    max_results = min(max_results, 100)
+
+    while True:
+        cmd = ["ec2", "describe-instance-types"]
+
+        filters = []
+        if family:
+            # Filter by instance type pattern
+            filters.append(f"Name=instance-type,Values={family}*")
+
+        if filters:
+            cmd.append("--filters")
+            cmd.extend(filters)
+
+        cmd.extend(["--max-results", str(max_results)])
+
+        if next_token:
+            cmd.extend(["--next-token", next_token])
+
+        response = run_aws_command(cmd, region=region)
+        if response and "InstanceTypes" in response:
+            batch_size = len(response["InstanceTypes"])
+            all_instances.extend(response["InstanceTypes"])
+            page_count += 1
+
+            if fetch_all and not family:
+                # Only show progress for full fetches (not family-specific)
+                print(
+                    f"  Fetched page {page_count}: {batch_size} instance types (total: {len(all_instances)})",
+                    file=sys.stderr,
+                )
+
+            # Check if there are more results
+            if fetch_all and "NextToken" in response:
+                next_token = response["NextToken"]
+            else:
+                break
+        else:
+            break
+
+    if fetch_all and page_count > 1:
+        filter_desc = f" for family '{family}'" if family else ""
+        print(
+            f"  Total: {len(all_instances)} instance types fetched{filter_desc}",
+            file=sys.stderr,
+        )
+
+    return all_instances
+
+
+def get_pricing_info(region: str = "us-east-1") -> Dict[str, Dict[str, float]]:
+    """
+    Get pricing information for instance types.
+
+    Note: AWS Pricing API requires us-east-1 region.
+    Returns a simplified pricing structure.
+
+    Args:
+        region: AWS region for pricing
+
+    Returns:
+        Dictionary mapping instance types to pricing info
+    """
+    # For simplicity, we'll use hardcoded common instance prices
+    # In production, you'd query the AWS Pricing API
+    pricing = {
+        # T3 family (burstable)
+        "t3.nano": {"on_demand": 0.0052},
+        "t3.micro": {"on_demand": 0.0104},
+        "t3.small": {"on_demand": 0.0208},
+        "t3.medium": {"on_demand": 0.0416},
+        "t3.large": {"on_demand": 0.0832},
+        "t3.xlarge": {"on_demand": 0.1664},
+        "t3.2xlarge": {"on_demand": 0.3328},
+        # T3a family (AMD)
+        "t3a.nano": {"on_demand": 0.0047},
+        "t3a.micro": {"on_demand": 0.0094},
+        "t3a.small": {"on_demand": 0.0188},
+        "t3a.medium": {"on_demand": 0.0376},
+        "t3a.large": {"on_demand": 0.0752},
+        "t3a.xlarge": {"on_demand": 0.1504},
+        "t3a.2xlarge": {"on_demand": 0.3008},
+        # M5 family (general purpose Intel)
+        "m5.large": {"on_demand": 0.096},
+        "m5.xlarge": {"on_demand": 0.192},
+        "m5.2xlarge": {"on_demand": 0.384},
+        "m5.4xlarge": {"on_demand": 0.768},
+        "m5.8xlarge": {"on_demand": 1.536},
+        "m5.12xlarge": {"on_demand": 2.304},
+        "m5.16xlarge": {"on_demand": 3.072},
+        "m5.24xlarge": {"on_demand": 4.608},
+        # M7a family (general purpose AMD)
+        "m7a.medium": {"on_demand": 0.0464},
+        "m7a.large": {"on_demand": 0.0928},
+        "m7a.xlarge": {"on_demand": 0.1856},
+        "m7a.2xlarge": {"on_demand": 0.3712},
+        "m7a.4xlarge": {"on_demand": 0.7424},
+        "m7a.8xlarge": {"on_demand": 1.4848},
+        "m7a.12xlarge": {"on_demand": 2.2272},
+        "m7a.16xlarge": {"on_demand": 2.9696},
+        "m7a.24xlarge": {"on_demand": 4.4544},
+        "m7a.32xlarge": {"on_demand": 5.9392},
+        "m7a.48xlarge": {"on_demand": 8.9088},
+        # C5 family (compute optimized)
+        "c5.large": {"on_demand": 0.085},
+        "c5.xlarge": {"on_demand": 0.17},
+        "c5.2xlarge": {"on_demand": 0.34},
+        "c5.4xlarge": {"on_demand": 0.68},
+        "c5.9xlarge": {"on_demand": 1.53},
+        "c5.12xlarge": {"on_demand": 2.04},
+        "c5.18xlarge": {"on_demand": 3.06},
+        "c5.24xlarge": {"on_demand": 4.08},
+        # C7a family (compute optimized AMD)
+        "c7a.medium": {"on_demand": 0.0387},
+        "c7a.large": {"on_demand": 0.0774},
+        "c7a.xlarge": {"on_demand": 0.1548},
+        "c7a.2xlarge": {"on_demand": 0.3096},
+        "c7a.4xlarge": {"on_demand": 0.6192},
+        "c7a.8xlarge": {"on_demand": 1.2384},
+        "c7a.12xlarge": {"on_demand": 1.8576},
+        "c7a.16xlarge": {"on_demand": 2.4768},
+        "c7a.24xlarge": {"on_demand": 3.7152},
+        "c7a.32xlarge": {"on_demand": 4.9536},
+        "c7a.48xlarge": {"on_demand": 7.4304},
+        # I4i family (storage optimized)
+        "i4i.large": {"on_demand": 0.117},
+        "i4i.xlarge": {"on_demand": 0.234},
+        "i4i.2xlarge": {"on_demand": 0.468},
+        "i4i.4xlarge": {"on_demand": 0.936},
+        "i4i.8xlarge": {"on_demand": 1.872},
+        "i4i.16xlarge": {"on_demand": 3.744},
+        "i4i.32xlarge": {"on_demand": 7.488},
+    }
+
+    # Adjust pricing based on region (simplified)
+    # Some regions are more expensive than others
+    region_multipliers = {
+        "us-east-1": 1.0,
+        "us-east-2": 1.0,
+        "us-west-1": 1.08,
+        "us-west-2": 1.0,
+        "eu-west-1": 1.1,
+        "eu-central-1": 1.15,
+        "ap-southeast-1": 1.2,
+        "ap-northeast-1": 1.25,
+    }
+
+    multiplier = region_multipliers.get(region, 1.1)
+    if multiplier != 1.0:
+        adjusted_pricing = {}
+        for instance_type, prices in pricing.items():
+            adjusted_pricing[instance_type] = {
+                "on_demand": prices["on_demand"] * multiplier
+            }
+        return adjusted_pricing
+
+    return pricing
+
+
+def sanitize_kconfig_name(name: str) -> str:
+    """Convert a name to a valid Kconfig symbol."""
+    # Replace special characters with underscores
+    name = name.replace("-", "_").replace(".", "_").replace(" ", "_")
+    # Convert to uppercase
+    name = name.upper()
+    # Remove any non-alphanumeric characters (except underscore)
+    name = "".join(c for c in name if c.isalnum() or c == "_")
+    # Ensure it doesn't start with a number
+    if name and name[0].isdigit():
+        name = "_" + name
+    return name
+
+
+# Cache for instance families to avoid redundant API calls
+_cached_families = None
+
+
+def get_generated_instance_families() -> set:
+    """Get the set of instance families that will have generated Kconfig files."""
+    global _cached_families
+
+    # Return cached result if available
+    if _cached_families is not None:
+        return _cached_families
+
+    # Return all families - we'll generate Kconfig files for all of them
+    # This function will be called by the aws-cli tool to determine which files to generate
+    if not check_aws_cli():
+        # Return a minimal set if AWS CLI is not available
+        _cached_families = {"m5", "t3", "c5"}
+        return _cached_families
+
+    # Get all available instance types
+    print("  Discovering available instance families...", file=sys.stderr)
+    instance_types = get_instance_types(fetch_all=True)
+
+    # Extract unique families
+    families = set()
+    for instance_type in instance_types:
+        type_name = instance_type.get("InstanceType", "")
+        # Extract family prefix (e.g., "m5" from "m5.large")
+        if "." in type_name:
+            family = type_name.split(".")[0]
+            families.add(family)
+
+    print(f"  Found {len(families)} instance families", file=sys.stderr)
+    _cached_families = families
+    return families
+
+
+def generate_instance_families_kconfig() -> str:
+    """Generate Kconfig content for AWS instance families."""
+    # Check if AWS CLI is available
+    if not check_aws_cli():
+        return generate_default_instance_families_kconfig()
+
+    # Get all available instance types (with pagination)
+    instance_types = get_instance_types(fetch_all=True)
+
+    # Extract unique families
+    families = set()
+    family_info = {}
+    for instance in instance_types:
+        instance_type = instance.get("InstanceType", "")
+        if "." in instance_type:
+            family = instance_type.split(".")[0]
+            families.add(family)
+            if family not in family_info:
+                family_info[family] = {
+                    "architectures": set(),
+                    "count": 0,
+                }
+            family_info[family]["count"] += 1
+            for arch in instance.get("ProcessorInfo", {}).get(
+                "SupportedArchitectures", []
+            ):
+                family_info[family]["architectures"].add(arch)
+
+    if not families:
+        return generate_default_instance_families_kconfig()
+
+    # Group families by category - use prefix patterns to catch all variants
+    def categorize_family(family_name):
+        """Categorize a family based on its prefix."""
+        if family_name.startswith(("m", "t")):
+            return "general_purpose"
+        elif family_name.startswith("c"):
+            return "compute_optimized"
+        elif family_name.startswith(("r", "x", "z")):
+            return "memory_optimized"
+        elif family_name.startswith(("i", "d", "h")):
+            return "storage_optimized"
+        elif family_name.startswith(("p", "g", "dl", "trn", "inf", "vt", "f")):
+            return "accelerated"
+        elif family_name.startswith(("mac", "hpc")):
+            return "specialized"
+        else:
+            return "other"
+
+    # Organize families by category
+    categorized_families = {
+        "general_purpose": [],
+        "compute_optimized": [],
+        "memory_optimized": [],
+        "storage_optimized": [],
+        "accelerated": [],
+        "specialized": [],
+        "other": [],
+    }
+
+    for family in sorted(families):
+        category = categorize_family(family)
+        categorized_families[category].append(family)
+
+    kconfig = """# AWS instance families (dynamically generated)
+# Generated by aws-cli from live AWS data
+
+choice
+    prompt "AWS instance family"
+    default TERRAFORM_AWS_INSTANCE_TYPE_M5
+    help
+      Select the AWS instance family for your deployment.
+      Different families are optimized for different workloads.
+
+"""
+
+    # Category headers
+    category_headers = {
+        "general_purpose": "# General Purpose - balanced compute, memory, and networking\n",
+        "compute_optimized": "# Compute Optimized - ideal for CPU-intensive applications\n",
+        "memory_optimized": "# Memory Optimized - for memory-intensive applications\n",
+        "storage_optimized": "# Storage Optimized - for high sequential read/write workloads\n",
+        "accelerated": "# Accelerated Computing - GPU and other accelerators\n",
+        "specialized": "# Specialized - for specific use cases\n",
+        "other": "# Other instance families\n",
+    }
+
+    # Add each category of families
+    for category in [
+        "general_purpose",
+        "compute_optimized",
+        "memory_optimized",
+        "storage_optimized",
+        "accelerated",
+        "specialized",
+        "other",
+    ]:
+        if categorized_families[category]:
+            kconfig += category_headers[category]
+            for family in categorized_families[category]:
+                kconfig += generate_family_config(family, family_info.get(family, {}))
+            if category != "other":  # Don't add extra newline after the last category
+                kconfig += "\n"
+
+    kconfig += "\nendchoice\n"
+
+    # Add instance type source includes for each family
+    # Only include families that we actually generate files for
+    generated_families = get_generated_instance_families()
+    kconfig += "\n# Include instance-specific configurations\n"
+    for family in sorted(families):
+        # Only add source statement if we generate a file for this family
+        if family in generated_families:
+            safe_name = sanitize_kconfig_name(family)
+            kconfig += f"""if TERRAFORM_AWS_INSTANCE_TYPE_{safe_name}
+source "terraform/aws/kconfigs/instance-types/Kconfig.{family}.generated"
+endif
+
+"""
+
+    # Add the TERRAFORM_AWS_INSTANCE_TYPE configuration that maps to the actual instance type
+    kconfig += """# Final instance type configuration
+config TERRAFORM_AWS_INSTANCE_TYPE
+    string
+    output yaml
+"""
+
+    # Add default for each family that maps to its size variable
+    for family in sorted(families):
+        safe_name = sanitize_kconfig_name(family)
+        kconfig += f"\tdefault TERRAFORM_AWS_{safe_name}_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_{safe_name}\n"
+
+    # Add a final fallback default
+    kconfig += '\tdefault "t3.micro"\n\n'
+
+    return kconfig
+
+
+def generate_family_config(family: str, info: Dict) -> str:
+    """Generate Kconfig entry for an instance family."""
+    safe_name = sanitize_kconfig_name(family)
+
+    # Determine architecture dependencies
+    architectures = info.get("architectures", set())
+    depends_line = ""
+    if architectures:
+        if "x86_64" in architectures and "arm64" not in architectures:
+            depends_line = "\n\tdepends on TARGET_ARCH_X86_64"
+        elif "arm64" in architectures and "x86_64" not in architectures:
+            depends_line = "\n\tdepends on TARGET_ARCH_ARM64"
+
+    # Family descriptions
+    descriptions = {
+        "t3": "Burstable performance instances powered by Intel processors",
+        "t3a": "Burstable performance instances powered by AMD processors",
+        "m5": "General purpose instances powered by Intel Xeon Platinum processors",
+        "m7a": "Latest generation general purpose instances powered by AMD EPYC processors",
+        "c5": "Compute optimized instances powered by Intel Xeon Platinum processors",
+        "c7a": "Latest generation compute optimized instances powered by AMD EPYC processors",
+        "i4i": "Storage optimized instances with NVMe SSD storage",
+        "is4gen": "Storage optimized ARM instances powered by AWS Graviton2",
+        "im4gn": "Storage optimized ARM instances with NVMe storage",
+        "r5": "Memory optimized instances powered by Intel Xeon Platinum processors",
+        "p3": "GPU instances for machine learning and HPC",
+        "g4dn": "GPU instances for graphics-intensive applications",
+    }
+
+    description = descriptions.get(family, f"AWS {family.upper()} instance family")
+    count = info.get("count", 0)
+
+    config = f"""config TERRAFORM_AWS_INSTANCE_TYPE_{safe_name}
+\tbool "{family.upper()}"
+{depends_line}
+\thelp
+\t  {description}
+\t  Available instance types: {count}
+
+"""
+    return config
+
+
+def generate_default_instance_families_kconfig() -> str:
+    """Generate default Kconfig content when AWS CLI is not available."""
+    return """# AWS instance families (default - AWS CLI not available)
+
+choice
+    prompt "AWS instance family"
+    default TERRAFORM_AWS_INSTANCE_TYPE_M5
+    help
+      Select the AWS instance family for your deployment.
+      Note: AWS CLI is not available, showing default options.
+
+config TERRAFORM_AWS_INSTANCE_TYPE_M5
+    bool "M5"
+    depends on TARGET_ARCH_X86_64
+    help
+      General purpose instances powered by Intel Xeon Platinum processors.
+
+config TERRAFORM_AWS_INSTANCE_TYPE_M7A
+    bool "M7a"
+    depends on TARGET_ARCH_X86_64
+    help
+      Latest generation general purpose instances powered by AMD EPYC processors.
+
+config TERRAFORM_AWS_INSTANCE_TYPE_T3
+    bool "T3"
+    depends on TARGET_ARCH_X86_64
+    help
+      Burstable performance instances powered by Intel processors.
+
+config TERRAFORM_AWS_INSTANCE_TYPE_C5
+    bool "C5"
+    depends on TARGET_ARCH_X86_64
+    help
+      Compute optimized instances powered by Intel Xeon Platinum processors.
+
+config TERRAFORM_AWS_INSTANCE_TYPE_I4I
+    bool "I4i"
+    depends on TARGET_ARCH_X86_64
+    help
+      Storage optimized instances with NVMe SSD storage.
+
+endchoice
+
+# Include instance-specific configurations
+if TERRAFORM_AWS_INSTANCE_TYPE_M5
+source "terraform/aws/kconfigs/instance-types/Kconfig.m5"
+endif
+
+if TERRAFORM_AWS_INSTANCE_TYPE_M7A
+source "terraform/aws/kconfigs/instance-types/Kconfig.m7a"
+endif
+
+if TERRAFORM_AWS_INSTANCE_TYPE_T3
+source "terraform/aws/kconfigs/instance-types/Kconfig.t3.generated"
+endif
+
+if TERRAFORM_AWS_INSTANCE_TYPE_C5
+source "terraform/aws/kconfigs/instance-types/Kconfig.c5.generated"
+endif
+
+if TERRAFORM_AWS_INSTANCE_TYPE_I4I
+source "terraform/aws/kconfigs/instance-types/Kconfig.i4i"
+endif
+
+# Final instance type configuration
+config TERRAFORM_AWS_INSTANCE_TYPE
+    string
+    output yaml
+    default TERRAFORM_AWS_M5_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_M5
+    default TERRAFORM_AWS_M7A_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_M7A
+    default TERRAFORM_AWS_T3_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_T3
+    default TERRAFORM_AWS_C5_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_C5
+    default TERRAFORM_AWS_I4I_SIZE if TERRAFORM_AWS_INSTANCE_TYPE_I4I
+    default "t3.micro"
+
+"""
+
+
+def generate_instance_types_kconfig(family: str) -> str:
+    """Generate Kconfig content for specific instance types within a family."""
+    if not check_aws_cli():
+        return ""
+
+    instance_types = get_instance_types(family=family, fetch_all=True)
+    if not instance_types:
+        return ""
+
+    # Filter to only exact family matches (e.g., c5a but not c5ad)
+    filtered_instances = []
+    for instance in instance_types:
+        instance_type = instance.get("InstanceType", "")
+        if "." in instance_type:
+            inst_family = instance_type.split(".")[0]
+            if inst_family == family:
+                filtered_instances.append(instance)
+
+    instance_types = filtered_instances
+    if not instance_types:
+        return ""
+
+    pricing = get_pricing_info()
+
+    # Sort by vCPU count and memory
+    instance_types.sort(
+        key=lambda x: (
+            x.get("VCpuInfo", {}).get("DefaultVCpus", 0),
+            x.get("MemoryInfo", {}).get("SizeInMiB", 0),
+        )
+    )
+
+    safe_family = sanitize_kconfig_name(family)
+
+    # Get the first instance type to use as default
+    default_instance_name = f"{safe_family}_LARGE"  # Fallback
+    if instance_types:
+        first_instance_type = instance_types[0].get("InstanceType", "")
+        if "." in first_instance_type:
+            first_full_name = first_instance_type.replace(".", "_")
+            default_instance_name = sanitize_kconfig_name(first_full_name)
+
+    kconfig = f"""# AWS {family.upper()} instance sizes (dynamically generated)
+
+choice
+\tprompt "Instance size for {family.upper()} family"
+\tdefault TERRAFORM_AWS_INSTANCE_{default_instance_name}
+\thelp
+\t  Select the specific instance size within the {family.upper()} family.
+
+"""
+
+    seen_configs = set()
+    for instance in instance_types:
+        instance_type = instance.get("InstanceType", "")
+        if "." not in instance_type:
+            continue
+
+        # Get the full instance type name to make unique config names
+        full_name = instance_type.replace(".", "_")
+        safe_full_name = sanitize_kconfig_name(full_name)
+
+        # Skip if we've already seen this config name
+        if safe_full_name in seen_configs:
+            continue
+        seen_configs.add(safe_full_name)
+
+        size = instance_type.split(".")[1]
+
+        vcpus = instance.get("VCpuInfo", {}).get("DefaultVCpus", 0)
+        memory_mib = instance.get("MemoryInfo", {}).get("SizeInMiB", 0)
+        memory_gb = memory_mib / 1024
+
+        # Get pricing
+        price = pricing.get(instance_type, {}).get("on_demand", 0.0)
+        price_str = f"${price:.3f}/hour" if price > 0 else "pricing varies"
+
+        # Network performance
+        network = instance.get("NetworkInfo", {}).get("NetworkPerformance", "varies")
+
+        # Storage
+        storage_info = ""
+        if instance.get("InstanceStorageSupported"):
+            storage = instance.get("InstanceStorageInfo", {})
+            total_size = storage.get("TotalSizeInGB", 0)
+            if total_size > 0:
+                storage_info = f"\n\t  Instance storage: {total_size} GB"
+
+        kconfig += f"""config TERRAFORM_AWS_INSTANCE_{safe_full_name}
+\tbool "{instance_type}"
+\thelp
+\t  vCPUs: {vcpus}
+\t  Memory: {memory_gb:.1f} GB
+\t  Network: {network}
+\t  Price: {price_str}{storage_info}
+
+"""
+
+    kconfig += "endchoice\n"
+
+    # Add the actual instance type string config with full instance names
+    kconfig += f"""
+config TERRAFORM_AWS_{safe_family}_SIZE
+\tstring
+"""
+
+    # Generate default mappings for each seen instance type
+    for instance in instance_types:
+        instance_type = instance.get("InstanceType", "")
+        if "." not in instance_type:
+            continue
+
+        full_name = instance_type.replace(".", "_")
+        safe_full_name = sanitize_kconfig_name(full_name)
+
+        kconfig += (
+            f'\tdefault "{instance_type}" if TERRAFORM_AWS_INSTANCE_{safe_full_name}\n'
+        )
+
+    # Use the first instance type as the final fallback default
+    final_default = f"{family}.large"
+    if instance_types:
+        first_instance_type = instance_types[0].get("InstanceType", "")
+        if first_instance_type:
+            final_default = first_instance_type
+
+    kconfig += f'\tdefault "{final_default}"\n\n'
+
+    return kconfig
+
+
+def generate_regions_kconfig() -> str:
+    """Generate Kconfig content for AWS regions."""
+    if not check_aws_cli():
+        return generate_default_regions_kconfig()
+
+    regions = get_regions()
+    if not regions:
+        return generate_default_regions_kconfig()
+
+    kconfig = """# AWS regions (dynamically generated)
+
+choice
+    prompt "AWS region"
+    default TERRAFORM_AWS_REGION_USEAST1
+    help
+      Select the AWS region for your deployment.
+      Note: Not all instance types are available in all regions.
+
+"""
+
+    # Group regions by geographic area
+    us_regions = []
+    eu_regions = []
+    ap_regions = []
+    other_regions = []
+
+    for region in regions:
+        region_name = region.get("RegionName", "")
+        if region_name.startswith("us-"):
+            us_regions.append(region)
+        elif region_name.startswith("eu-"):
+            eu_regions.append(region)
+        elif region_name.startswith("ap-"):
+            ap_regions.append(region)
+        else:
+            other_regions.append(region)
+
+    # Add US regions
+    if us_regions:
+        kconfig += "# US Regions\n"
+        for region in sorted(us_regions, key=lambda x: x.get("RegionName", "")):
+            kconfig += generate_region_config(region)
+        kconfig += "\n"
+
+    # Add EU regions
+    if eu_regions:
+        kconfig += "# Europe Regions\n"
+        for region in sorted(eu_regions, key=lambda x: x.get("RegionName", "")):
+            kconfig += generate_region_config(region)
+        kconfig += "\n"
+
+    # Add Asia Pacific regions
+    if ap_regions:
+        kconfig += "# Asia Pacific Regions\n"
+        for region in sorted(ap_regions, key=lambda x: x.get("RegionName", "")):
+            kconfig += generate_region_config(region)
+        kconfig += "\n"
+
+    # Add other regions
+    if other_regions:
+        kconfig += "# Other Regions\n"
+        for region in sorted(other_regions, key=lambda x: x.get("RegionName", "")):
+            kconfig += generate_region_config(region)
+
+    kconfig += "\nendchoice\n"
+
+    # Add the actual region string config
+    kconfig += """
+config TERRAFORM_AWS_REGION
+    string
+"""
+
+    for region in regions:
+        region_name = region.get("RegionName", "")
+        safe_name = sanitize_kconfig_name(region_name)
+        kconfig += f'\tdefault "{region_name}" if TERRAFORM_AWS_REGION_{safe_name}\n'
+
+    kconfig += '\tdefault "us-east-1"\n'
+
+    return kconfig
+
+
+def generate_region_config(region: Dict) -> str:
+    """Generate Kconfig entry for a region."""
+    region_name = region.get("RegionName", "")
+    safe_name = sanitize_kconfig_name(region_name)
+    opt_in_status = region.get("OptInStatus", "")
+
+    # Region display names
+    display_names = {
+        "us-east-1": "US East (N. Virginia)",
+        "us-east-2": "US East (Ohio)",
+        "us-west-1": "US West (N. California)",
+        "us-west-2": "US West (Oregon)",
+        "eu-west-1": "Europe (Ireland)",
+        "eu-west-2": "Europe (London)",
+        "eu-west-3": "Europe (Paris)",
+        "eu-central-1": "Europe (Frankfurt)",
+        "eu-north-1": "Europe (Stockholm)",
+        "ap-southeast-1": "Asia Pacific (Singapore)",
+        "ap-southeast-2": "Asia Pacific (Sydney)",
+        "ap-northeast-1": "Asia Pacific (Tokyo)",
+        "ap-northeast-2": "Asia Pacific (Seoul)",
+        "ap-south-1": "Asia Pacific (Mumbai)",
+        "ca-central-1": "Canada (Central)",
+        "sa-east-1": "South America (São Paulo)",
+    }
+
+    display_name = display_names.get(region_name, region_name.replace("-", " ").title())
+
+    help_text = f"\t  Region: {display_name}"
+    if opt_in_status and opt_in_status != "opt-in-not-required":
+        help_text += f"\n\t  Status: {opt_in_status}"
+
+    config = f"""config TERRAFORM_AWS_REGION_{safe_name}
+\tbool "{display_name}"
+\thelp
+{help_text}
+
+"""
+    return config
+
+
+def get_gpu_amis(region: str = None) -> List[Dict[str, Any]]:
+    """
+    Get available GPU-optimized AMIs including Deep Learning AMIs.
+
+    Args:
+        region: AWS region
+
+    Returns:
+        List of AMI information
+    """
+    # Query for Deep Learning AMIs from AWS
+    cmd = ["ec2", "describe-images"]
+    filters = [
+        "Name=owner-alias,Values=amazon",
+        "Name=name,Values=Deep Learning AMI GPU*",
+        "Name=state,Values=available",
+        "Name=architecture,Values=x86_64",
+    ]
+    cmd.append("--filters")
+    cmd.extend(filters)
+    cmd.extend(["--query", "Images[?contains(Name, '2024') || contains(Name, '2025')]"])
+
+    response = run_aws_command(cmd, region=region)
+
+    if response:
+        # Sort by creation date to get the most recent
+        response.sort(key=lambda x: x.get("CreationDate", ""), reverse=True)
+        return response[:10]  # Return top 10 most recent
+    return []
+
+
+def generate_gpu_amis_kconfig() -> str:
+    """Generate Kconfig content for GPU AMIs."""
+    # Check if AWS CLI is available
+    if not check_aws_cli():
+        return generate_default_gpu_amis_kconfig()
+
+    # Get available GPU AMIs
+    amis = get_gpu_amis()
+
+    if not amis:
+        return generate_default_gpu_amis_kconfig()
+
+    kconfig = """# GPU-optimized AMIs (dynamically generated)
+
+# GPU AMI Override - only shown for GPU instances
+config TERRAFORM_AWS_USE_GPU_AMI
+    bool "Use GPU-optimized AMI instead of standard distribution"
+    depends on TERRAFORM_AWS_IS_GPU_INSTANCE
+    output yaml
+    default n
+    help
+      Enable this to use a GPU-optimized AMI with pre-installed NVIDIA drivers,
+      CUDA, and ML frameworks instead of the standard distribution AMI.
+
+      When disabled, the standard distribution AMI will be used and you'll need
+      to install GPU drivers manually.
+
+if TERRAFORM_AWS_USE_GPU_AMI
+
+choice
+    prompt "GPU-optimized AMI selection"
+    default TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+    depends on TERRAFORM_AWS_IS_GPU_INSTANCE
+    help
+      Select which GPU-optimized AMI to use for your GPU instance.
+
+config TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+    bool "AWS Deep Learning AMI (Ubuntu 22.04)"
+    help
+      AWS Deep Learning AMI with NVIDIA drivers, CUDA, cuDNN, and popular ML frameworks.
+      Optimized for machine learning workloads on GPU instances.
+      Includes: TensorFlow, PyTorch, MXNet, and Jupyter.
+
+config TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING_NVIDIA
+    bool "NVIDIA Deep Learning AMI"
+    help
+      NVIDIA optimized Deep Learning AMI with latest GPU drivers.
+      Includes NVIDIA GPU Cloud (NGC) containers and frameworks.
+
+config TERRAFORM_AWS_GPU_AMI_CUSTOM
+    bool "Custom GPU AMI"
+    help
+      Specify a custom AMI ID for GPU instances.
+
+endchoice
+
+if TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+
+config TERRAFORM_AWS_GPU_AMI_NAME
+    string
+    output yaml
+    default "Deep Learning AMI GPU TensorFlow*"
+    help
+      AMI name pattern for AWS Deep Learning AMI.
+
+config TERRAFORM_AWS_GPU_AMI_OWNER
+    string
+    output yaml
+    default "amazon"
+
+endif # TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+
+if TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING_NVIDIA
+
+config TERRAFORM_AWS_GPU_AMI_NAME
+    string
+    output yaml
+    default "NVIDIA Deep Learning AMI*"
+    help
+      AMI name pattern for NVIDIA Deep Learning AMI.
+
+config TERRAFORM_AWS_GPU_AMI_OWNER
+    string
+    output yaml
+    default "amazon"
+
+endif # TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING_NVIDIA
+
+if TERRAFORM_AWS_GPU_AMI_CUSTOM
+
+config TERRAFORM_AWS_GPU_AMI_ID
+    string "Custom GPU AMI ID"
+    output yaml
+    help
+      Specify the AMI ID for your custom GPU image.
+      Example: ami-0123456789abcdef0
+
+endif # TERRAFORM_AWS_GPU_AMI_CUSTOM
+
+endif # TERRAFORM_AWS_USE_GPU_AMI
+
+# GPU instance detection
+config TERRAFORM_AWS_IS_GPU_INSTANCE
+    bool
+    output yaml
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G6E
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G6
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G5
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G5G
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G4DN
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G4AD
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P5
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P5EN
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P4D
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P4DE
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P3
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P3DN
+    default n
+    help
+      Automatically detected based on selected instance type.
+      This indicates whether the selected instance has GPU support.
+
+"""
+
+    return kconfig
+
+
+def generate_default_gpu_amis_kconfig() -> str:
+    """Generate default GPU AMI Kconfig when AWS CLI is not available."""
+    return """# GPU-optimized AMIs (default - AWS CLI not available)
+
+# GPU AMI Override - only shown for GPU instances
+config TERRAFORM_AWS_USE_GPU_AMI
+    bool "Use GPU-optimized AMI instead of standard distribution"
+    depends on TERRAFORM_AWS_IS_GPU_INSTANCE
+    output yaml
+    default n
+    help
+      Enable this to use a GPU-optimized AMI with pre-installed NVIDIA drivers,
+      CUDA, and ML frameworks instead of the standard distribution AMI.
+      Note: AWS CLI is not available, showing default options.
+
+if TERRAFORM_AWS_USE_GPU_AMI
+
+choice
+    prompt "GPU-optimized AMI selection"
+    default TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+    depends on TERRAFORM_AWS_IS_GPU_INSTANCE
+    help
+      Select which GPU-optimized AMI to use for your GPU instance.
+
+config TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+    bool "AWS Deep Learning AMI (Ubuntu 22.04)"
+    help
+      Pre-configured with NVIDIA drivers, CUDA, and ML frameworks.
+
+config TERRAFORM_AWS_GPU_AMI_CUSTOM
+    bool "Custom GPU AMI"
+
+endchoice
+
+if TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+
+config TERRAFORM_AWS_GPU_AMI_NAME
+    string
+    output yaml
+    default "Deep Learning AMI GPU TensorFlow*"
+
+config TERRAFORM_AWS_GPU_AMI_OWNER
+    string
+    output yaml
+    default "amazon"
+
+endif # TERRAFORM_AWS_GPU_AMI_DEEP_LEARNING
+
+if TERRAFORM_AWS_GPU_AMI_CUSTOM
+
+config TERRAFORM_AWS_GPU_AMI_ID
+    string "Custom GPU AMI ID"
+    output yaml
+    help
+      Specify the AMI ID for your custom GPU image.
+
+endif # TERRAFORM_AWS_GPU_AMI_CUSTOM
+
+endif # TERRAFORM_AWS_USE_GPU_AMI
+
+# GPU instance detection (static)
+config TERRAFORM_AWS_IS_GPU_INSTANCE
+    bool
+    output yaml
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G6E
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G6
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G5
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G5G
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G4DN
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_G4AD
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P5
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P5EN
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P4D
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P4DE
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P3
+    default y if TERRAFORM_AWS_INSTANCE_TYPE_P3DN
+    default n
+    help
+      Automatically detected based on selected instance type.
+      This indicates whether the selected instance has GPU support.
+
+"""
+
+
+def generate_default_regions_kconfig() -> str:
+    """Generate default Kconfig content when AWS CLI is not available."""
+    return """# AWS regions (default - AWS CLI not available)
+
+choice
+    prompt "AWS region"
+    default TERRAFORM_AWS_REGION_USEAST1
+    help
+      Select the AWS region for your deployment.
+      Note: AWS CLI is not available, showing default options.
+
+# US Regions
+config TERRAFORM_AWS_REGION_USEAST1
+    bool "US East (N. Virginia)"
+
+config TERRAFORM_AWS_REGION_USEAST2
+    bool "US East (Ohio)"
+
+config TERRAFORM_AWS_REGION_USWEST1
+    bool "US West (N. California)"
+
+config TERRAFORM_AWS_REGION_USWEST2
+    bool "US West (Oregon)"
+
+# Europe Regions
+config TERRAFORM_AWS_REGION_EUWEST1
+    bool "Europe (Ireland)"
+
+config TERRAFORM_AWS_REGION_EUCENTRAL1
+    bool "Europe (Frankfurt)"
+
+# Asia Pacific Regions
+config TERRAFORM_AWS_REGION_APSOUTHEAST1
+    bool "Asia Pacific (Singapore)"
+
+config TERRAFORM_AWS_REGION_APNORTHEAST1
+    bool "Asia Pacific (Tokyo)"
+
+endchoice
+
+config TERRAFORM_AWS_REGION
+    string
+    default "us-east-1" if TERRAFORM_AWS_REGION_USEAST1
+    default "us-east-2" if TERRAFORM_AWS_REGION_USEAST2
+    default "us-west-1" if TERRAFORM_AWS_REGION_USWEST1
+    default "us-west-2" if TERRAFORM_AWS_REGION_USWEST2
+    default "eu-west-1" if TERRAFORM_AWS_REGION_EUWEST1
+    default "eu-central-1" if TERRAFORM_AWS_REGION_EUCENTRAL1
+    default "ap-southeast-1" if TERRAFORM_AWS_REGION_APSOUTHEAST1
+    default "ap-northeast-1" if TERRAFORM_AWS_REGION_APNORTHEAST1
+    default "us-east-1"
+
+"""
diff --git a/scripts/dynamic-cloud-kconfig.Makefile b/scripts/dynamic-cloud-kconfig.Makefile
index e15651ab..9c9d718e 100644
--- a/scripts/dynamic-cloud-kconfig.Makefile
+++ b/scripts/dynamic-cloud-kconfig.Makefile
@@ -12,9 +12,24 @@ LAMBDALABS_KCONFIG_IMAGES := $(LAMBDALABS_KCONFIG_DIR)/Kconfig.images.generated
 
 LAMBDALABS_KCONFIGS := $(LAMBDALABS_KCONFIG_COMPUTE) $(LAMBDALABS_KCONFIG_LOCATION) $(LAMBDALABS_KCONFIG_IMAGES)
 
+# AWS dynamic configuration
+AWS_KCONFIG_DIR := terraform/aws/kconfigs
+AWS_KCONFIG_COMPUTE := $(AWS_KCONFIG_DIR)/Kconfig.compute.generated
+AWS_KCONFIG_LOCATION := $(AWS_KCONFIG_DIR)/Kconfig.location.generated
+AWS_INSTANCE_TYPES_DIR := $(AWS_KCONFIG_DIR)/instance-types
+
+# List of AWS instance type family files that will be generated
+AWS_INSTANCE_TYPE_FAMILIES := m5 m7a t3 t3a c5 c7a i4i is4gen im4gn
+AWS_INSTANCE_TYPE_KCONFIGS := $(foreach family,$(AWS_INSTANCE_TYPE_FAMILIES),$(AWS_INSTANCE_TYPES_DIR)/Kconfig.$(family).generated)
+
+AWS_KCONFIGS := $(AWS_KCONFIG_COMPUTE) $(AWS_KCONFIG_LOCATION) $(AWS_INSTANCE_TYPE_KCONFIGS)
+
 # Add Lambda Labs generated files to mrproper clean list
 KDEVOPS_MRPROPER += $(LAMBDALABS_KCONFIGS)
 
+# Add AWS generated files to mrproper clean list
+KDEVOPS_MRPROPER += $(AWS_KCONFIGS)
+
 # Touch Lambda Labs generated files so Kconfig can source them
 # This ensures the files exist (even if empty) before Kconfig runs
 dynamic_lambdalabs_kconfig_touch:
@@ -22,20 +37,48 @@ dynamic_lambdalabs_kconfig_touch:
 
 DYNAMIC_KCONFIG += dynamic_lambdalabs_kconfig_touch
 
+# Touch AWS generated files so Kconfig can source them
+# This ensures the files exist (even if empty) before Kconfig runs
+dynamic_aws_kconfig_touch:
+	$(Q)mkdir -p $(AWS_INSTANCE_TYPES_DIR)
+	$(Q)touch $(AWS_KCONFIG_COMPUTE) $(AWS_KCONFIG_LOCATION)
+	$(Q)touch $(AWS_KCONFIG_DIR)/Kconfig.gpu-amis.generated
+	$(Q)for family in $(AWS_INSTANCE_TYPE_FAMILIES); do \
+		touch $(AWS_INSTANCE_TYPES_DIR)/Kconfig.$$family.generated; \
+	done
+	# Touch all existing generated files
+	$(Q)for file in $(AWS_INSTANCE_TYPES_DIR)/Kconfig.*.generated; do \
+		if [ -f "$$file" ]; then \
+			touch "$$file"; \
+		fi; \
+	done
+
+DYNAMIC_KCONFIG += dynamic_aws_kconfig_touch
+
 # Individual Lambda Labs targets are now handled by generate_cloud_configs.py
 cloud-config-lambdalabs:
 	$(Q)python3 scripts/generate_cloud_configs.py
 
+# Individual AWS targets are now handled by generate_cloud_configs.py
+cloud-config-aws:
+	$(Q)python3 scripts/generate_cloud_configs.py
+
 # Clean Lambda Labs generated files
 clean-cloud-config-lambdalabs:
 	$(Q)rm -f $(LAMBDALABS_KCONFIGS)
 
-DYNAMIC_CLOUD_KCONFIG += cloud-config-lambdalabs
+# Clean AWS generated files
+clean-cloud-config-aws:
+	$(Q)rm -f $(AWS_KCONFIGS)
+
+DYNAMIC_CLOUD_KCONFIG += cloud-config-lambdalabs cloud-config-aws
 
 cloud-config-help:
 	@echo "Cloud-specific dynamic kconfig targets:"
 	@echo "cloud-config            - generates all cloud provider dynamic kconfig content"
 	@echo "cloud-config-lambdalabs - generates Lambda Labs dynamic kconfig content"
+	@echo "cloud-config-aws        - generates AWS dynamic kconfig content"
+	@echo "cloud-update            - converts generated cloud configs to static (for committing)"
 	@echo "clean-cloud-config      - removes all generated cloud kconfig files"
 	@echo "cloud-list-all          - list all cloud instances for configured provider"
 
@@ -44,11 +87,50 @@ HELP_TARGETS += cloud-config-help
 cloud-config:
 	$(Q)python3 scripts/generate_cloud_configs.py
 
-clean-cloud-config: clean-cloud-config-lambdalabs
+clean-cloud-config: clean-cloud-config-lambdalabs clean-cloud-config-aws
+	$(Q)rm -f .cloud.initialized
 	$(Q)echo "Cleaned all cloud provider dynamic Kconfig files."
 
 cloud-list-all:
 	$(Q)chmod +x scripts/cloud_list_all.sh
 	$(Q)scripts/cloud_list_all.sh
 
-PHONY += cloud-config cloud-config-lambdalabs clean-cloud-config clean-cloud-config-lambdalabs cloud-config-help cloud-list-all
+# Convert dynamically generated cloud configs to static versions for git commits
+# This allows admins to generate configs once and commit them for regular users
+cloud-update:
+	@echo "Converting generated cloud configs to static versions..."
+	# AWS configs
+	$(Q)if [ -f $(AWS_KCONFIG_COMPUTE) ]; then \
+		cp $(AWS_KCONFIG_COMPUTE) $(AWS_KCONFIG_DIR)/Kconfig.compute.static; \
+		sed -i 's/Kconfig\.\([^.]*\)\.generated/Kconfig.\1.static/g' $(AWS_KCONFIG_DIR)/Kconfig.compute.static; \
+		echo "  Created $(AWS_KCONFIG_DIR)/Kconfig.compute.static"; \
+	fi
+	$(Q)if [ -f $(AWS_KCONFIG_LOCATION) ]; then \
+		cp $(AWS_KCONFIG_LOCATION) $(AWS_KCONFIG_DIR)/Kconfig.location.static; \
+		sed -i 's/Kconfig\.\([^.]*\)\.generated/Kconfig.\1.static/g' $(AWS_KCONFIG_DIR)/Kconfig.location.static; \
+		echo "  Created $(AWS_KCONFIG_DIR)/Kconfig.location.static"; \
+	fi
+	# AWS instance type families
+	$(Q)for file in $(AWS_INSTANCE_TYPES_DIR)/Kconfig.*.generated; do \
+		if [ -f "$$file" ]; then \
+			static_file=$$(echo "$$file" | sed 's/\.generated$$/\.static/'); \
+			cp "$$file" "$$static_file"; \
+			echo "  Created $$static_file"; \
+		fi; \
+	done
+	# Lambda Labs configs
+	$(Q)if [ -f $(LAMBDALABS_KCONFIG_COMPUTE) ]; then \
+		cp $(LAMBDALABS_KCONFIG_COMPUTE) $(LAMBDALABS_KCONFIG_DIR)/Kconfig.compute.static; \
+		echo "  Created $(LAMBDALABS_KCONFIG_DIR)/Kconfig.compute.static"; \
+	fi
+	$(Q)if [ -f $(LAMBDALABS_KCONFIG_LOCATION) ]; then \
+		cp $(LAMBDALABS_KCONFIG_LOCATION) $(LAMBDALABS_KCONFIG_DIR)/Kconfig.location.static; \
+		echo "  Created $(LAMBDALABS_KCONFIG_DIR)/Kconfig.location.static"; \
+	fi
+	$(Q)if [ -f $(LAMBDALABS_KCONFIG_IMAGES) ]; then \
+		cp $(LAMBDALABS_KCONFIG_IMAGES) $(LAMBDALABS_KCONFIG_DIR)/Kconfig.images.static; \
+		echo "  Created $(LAMBDALABS_KCONFIG_DIR)/Kconfig.images.static"; \
+	fi
+	@echo "Static cloud configs created. You can now commit these .static files to git."
+
+PHONY += cloud-config cloud-config-lambdalabs cloud-config-aws clean-cloud-config clean-cloud-config-lambdalabs clean-cloud-config-aws cloud-config-help cloud-list-all cloud-update
diff --git a/scripts/generate_cloud_configs.py b/scripts/generate_cloud_configs.py
index b16294dd..b208f170 100755
--- a/scripts/generate_cloud_configs.py
+++ b/scripts/generate_cloud_configs.py
@@ -10,6 +10,9 @@ import os
 import sys
 import subprocess
 import json
+from concurrent.futures import ThreadPoolExecutor, as_completed
+from pathlib import Path
+from typing import Tuple
 
 
 def generate_lambdalabs_kconfig() -> bool:
@@ -100,29 +103,189 @@ def get_lambdalabs_summary() -> tuple[bool, str]:
         return False, "Lambda Labs: Error querying API - using defaults"
 
 
+def generate_aws_kconfig() -> bool:
+    """
+    Generate AWS Kconfig files.
+    Returns True on success, False on failure.
+    """
+    script_dir = os.path.dirname(os.path.abspath(__file__))
+    cli_path = os.path.join(script_dir, "aws-cli")
+
+    # Generate the Kconfig files
+    result = subprocess.run(
+        [cli_path, "generate-kconfig"],
+        capture_output=True,
+        text=True,
+        check=False,
+    )
+
+    return result.returncode == 0
+
+
+def get_aws_summary() -> tuple[bool, str]:
+    """
+    Get a summary of AWS configurations using aws-cli.
+    Returns (success, summary_string)
+    """
+    script_dir = os.path.dirname(os.path.abspath(__file__))
+    cli_path = os.path.join(script_dir, "aws-cli")
+
+    try:
+        # Check if AWS CLI is available
+        result = subprocess.run(
+            ["aws", "--version"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+
+        if result.returncode != 0:
+            return False, "AWS: AWS CLI not installed - using defaults"
+
+        # Check if credentials are configured
+        result = subprocess.run(
+            ["aws", "sts", "get-caller-identity"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+
+        if result.returncode != 0:
+            return False, "AWS: Credentials not configured - using defaults"
+
+        # Get instance types count
+        result = subprocess.run(
+            [
+                cli_path,
+                "--output",
+                "json",
+                "instance-types",
+                "list",
+                "--max-results",
+                "100",
+            ],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+
+        if result.returncode != 0:
+            return False, "AWS: Error querying API - using defaults"
+
+        instances = json.loads(result.stdout)
+        instance_count = len(instances)
+
+        # Get regions
+        result = subprocess.run(
+            [cli_path, "--output", "json", "regions", "list"],
+            capture_output=True,
+            text=True,
+            check=False,
+        )
+
+        if result.returncode == 0:
+            regions = json.loads(result.stdout)
+            region_count = len(regions)
+        else:
+            region_count = 0
+
+        # Get price range from a sample of instances
+        prices = []
+        for instance in instances[:20]:  # Sample first 20 for speed
+            if "error" not in instance:
+                # Extract price if available (would need pricing API)
+                # For now, we'll use placeholder
+                vcpus = instance.get("vcpu", 0)
+                if vcpus > 0:
+                    # Rough estimate: $0.05 per vCPU/hour
+                    estimated_price = vcpus * 0.05
+                    prices.append(estimated_price)
+
+        # Format summary
+        if prices:
+            min_price = min(prices)
+            max_price = max(prices)
+            price_range = f"~${min_price:.2f}-${max_price:.2f}/hr"
+        else:
+            price_range = "pricing varies by region"
+
+        return (
+            True,
+            f"AWS: {instance_count} instance types available, "
+            f"{region_count} regions, {price_range}",
+        )
+
+    except (subprocess.SubprocessError, json.JSONDecodeError, KeyError):
+        return False, "AWS: Error querying API - using defaults"
+
+
+def process_lambdalabs() -> Tuple[bool, bool, str]:
+    """Process Lambda Labs configuration generation and summary.
+    Returns (kconfig_generated, summary_success, summary_text)
+    """
+    kconfig_generated = generate_lambdalabs_kconfig()
+    success, summary = get_lambdalabs_summary()
+    return kconfig_generated, success, summary
+
+
+def process_aws() -> Tuple[bool, bool, str]:
+    """Process AWS configuration generation and summary.
+    Returns (kconfig_generated, summary_success, summary_text)
+    """
+    kconfig_generated = generate_aws_kconfig()
+    success, summary = get_aws_summary()
+
+    return kconfig_generated, success, summary
+
+
 def main():
     """Main function to generate cloud configurations."""
     print("Cloud Provider Configuration Summary")
     print("=" * 60)
     print()
 
-    # Lambda Labs - Generate Kconfig files first
-    kconfig_generated = generate_lambdalabs_kconfig()
+    # Run cloud provider operations in parallel
+    results = {}
+    any_success = False
 
-    # Lambda Labs - Get summary
-    success, summary = get_lambdalabs_summary()
-    if success:
-        print(f"✓ {summary}")
-        if kconfig_generated:
-            print("  Kconfig files generated successfully")
-        else:
-            print("  Warning: Failed to generate Kconfig files")
-    else:
-        print(f"⚠ {summary}")
-    print()
+    with ThreadPoolExecutor(max_workers=4) as executor:
+        # Submit all tasks
+        futures = {
+            executor.submit(process_lambdalabs): "lambdalabs",
+            executor.submit(process_aws): "aws",
+        }
+
+        # Process results as they complete
+        for future in as_completed(futures):
+            provider = futures[future]
+            try:
+                results[provider] = future.result()
+            except Exception as e:
+                results[provider] = (
+                    False,
+                    False,
+                    f"{provider.upper()}: Error - {str(e)}",
+                )
+
+    # Display results in consistent order
+    for provider in ["lambdalabs", "aws"]:
+        if provider in results:
+            kconfig_gen, success, summary = results[provider]
+            if success and kconfig_gen:
+                any_success = True
+            if success:
+                print(f"✓ {summary}")
+                if kconfig_gen:
+                    print("  Kconfig files generated successfully")
+                else:
+                    print("  Warning: Failed to generate Kconfig files")
+            else:
+                print(f"⚠ {summary}")
+            print()
 
-    # AWS (placeholder - not implemented)
-    print("⚠ AWS: Dynamic configuration not yet implemented")
+    # Create .cloud.initialized if any provider succeeded
+    if any_success:
+        Path(".cloud.initialized").touch()
 
     # Azure (placeholder - not implemented)
     print("⚠ Azure: Dynamic configuration not yet implemented")
diff --git a/terraform/aws/kconfigs/Kconfig.compute b/terraform/aws/kconfigs/Kconfig.compute
index 4b9c6efb..07b0e6ea 100644
--- a/terraform/aws/kconfigs/Kconfig.compute
+++ b/terraform/aws/kconfigs/Kconfig.compute
@@ -1,94 +1,19 @@
-choice
-	prompt "AWS instance types"
-	help
-	  Instance types comprise varying combinations of hardware
-	  platform, CPU count, memory size, storage, and networking
-	  capacity. Select the type that provides an appropriate mix
-	  of resources for your preferred workflows.
-
-	  Some instance types are region- and capacity-limited.
-
-	  See https://aws.amazon.com/ec2/instance-types/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_M5
-	bool "M5"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This is a general purpose type powered by Intel Xeon®
-	  Platinum 8175M or 8259CL processors (Skylake or Cascade
-	  Lake).
-
-	  See https://aws.amazon.com/ec2/instance-types/m5/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_M7A
-	bool "M7a"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This is a general purpose type powered by 4th Generation
-	  AMD EPYC processors.
-
-	  See https://aws.amazon.com/ec2/instance-types/m7a/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_I4I
-	bool "I4i"
-	depends on TARGET_ARCH_X86_64
-	help
-	  This is a storage-optimized type powered by 3rd generation
-	  Intel Xeon Scalable processors (Ice Lake) and use AWS Nitro
-	  NVMe SSDs.
+# AWS compute configuration
 
-	  See https://aws.amazon.com/ec2/instance-types/i4i/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_IS4GEN
-	bool "Is4gen"
-	depends on TARGET_ARCH_ARM64
-	help
-	  This is a Storage-optimized type powered by AWS Graviton2
-	  processors.
-
-	  See https://aws.amazon.com/ec2/instance-types/i4g/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_IM4GN
-	bool "Im4gn"
-	depends on TARGET_ARCH_ARM64
-	help
-	  This is a storage-optimized type powered by AWS Graviton2
-	  processors.
-
-	  See https://aws.amazon.com/ec2/instance-types/i4g/ for
-	  details.
-
-config TERRAFORM_AWS_INSTANCE_TYPE_C7A
-	depends on TARGET_ARCH_X86_64
-	bool "c7a"
-	help
-	  This is a compute-optimized type powered by 4th generation
-	  AMD EPYC processors.
-
-	  See https://aws.amazon.com/ec2/instance-types/c7a/ for
-	  details.
-
-endchoice
+# Include dynamically generated instance families
+# Generated by 'make cloud-config' from AWS API
+source "terraform/aws/kconfigs/Kconfig.compute.generated"
 
-source "terraform/aws/kconfigs/instance-types/Kconfig.m5"
-source "terraform/aws/kconfigs/instance-types/Kconfig.m7a"
-source "terraform/aws/kconfigs/instance-types/Kconfig.i4i"
-source "terraform/aws/kconfigs/instance-types/Kconfig.is4gen"
-source "terraform/aws/kconfigs/instance-types/Kconfig.im4gn"
-source "terraform/aws/kconfigs/instance-types/Kconfig.c7a"
+# Include GPU AMI configuration
+source "terraform/aws/kconfigs/Kconfig.gpu-amis.generated"
 
 choice
 	prompt "Linux distribution"
 	default TERRAFORM_AWS_DISTRO_DEBIAN
 	help
-	  Select a popular Linux distribution to install on your
-	  instances, or use the "Custom AMI image" selection to
-	  choose an image that is off the beaten path.
+	Select a popular Linux distribution to install on your
+	instances, or use the "Custom AMI image" selection to
+	choose an image that is off the beaten path.
 
 config TERRAFORM_AWS_DISTRO_AMAZON
 	bool "Amazon Linux"
diff --git a/terraform/aws/kconfigs/Kconfig.location b/terraform/aws/kconfigs/Kconfig.location
index e5dacb9d..fbdf7eb1 100644
--- a/terraform/aws/kconfigs/Kconfig.location
+++ b/terraform/aws/kconfigs/Kconfig.location
@@ -1,679 +1,21 @@
-choice
-	prompt "AWS region"
-	default TERRAFORM_AWS_REGION_US_WEST_2
-	help
-	  Use this option to select the AWS region that hosts your
-	  compute and storage resources. If you do not explicitly
-	  specify a region, the US West (Oregon) region is the
-	  default.
-
-	  Once selected, you can stick with the default AV zone
-	  chosen by kdevops, or use:
-
-	    aws ec2 describe-availability-zones --region <region-name>
-
-	  to list the Availability Zones that are enabled for your
-	  AWS account. Enter your selection from this list using the
-	  TERRAFORM_AWS_AV_ZONE menu.
-
-	  If you wish to expand on the region list, send a patch after
-	  reading this list:
-
-	  https://docs.aws.amazon.com/general/latest/gr/rande.html
-
-	  Note that if you change region the AMI may change as well even
-	  for the same distribution. At least that applies to Amazon EC2
-	  optimized images. Use the AWS console, to set that up it will
-	  ask you for your credentials and then a region. Before adding
-	  an entry for ami image be sure you are on the region and then
-	  query with something like:
-
-	  aws ec2 describe-images --image-ids ami-0efa651876de2a5ce
-
-	  For instance, this AMI belongs to us-west-2 only. us-east* have
-	  other AMIs for the same Amazon 2023 EC2 image. The output from
-	  here tells me:
-
-	  "OwnerId": "137112412989"
-
-	  And that is what value to use for ami-0efa651876de2a5ce
-	  for the TERRAFORM_AWS_AMI_OWNER. To get the ami-* for your regions
-	  just go to your EC2 console, that console will be associated with
-	  a region already. You have to change regions if you want to look
-	  for AMIs in other regions. There are for example two different
-	  ami-* values for Amazon Linux 2023 for different regions. However
-	  they values can be same. For example below are the us-west-2 queries
-	  for Amazon Linux 2023 for x86_64 and then for ARM64.
-
-	  aws ec2 describe-images --image-ids ami-0efa651876de2a5ce | grep OwnerId
-	    "OwnerId": "137112412989",
-	  aws ec2 describe-images --image-ids ami-0699f753302dd8b00 | grep OwnerId
-	    "OwnerId": "137112412989",
-
-config TERRAFORM_AWS_REGION_AP_NORTHEAST_1
-	bool "ap-northeast-1 - Tokyo"
-	help
-	  This option specifies the Asia-Pacific northeast-1 region.
-	  The data center is located in Tokyo, Japan.
-
-config TERRAFORM_AWS_REGION_AP_NORTHEAST_2
-	bool "ap-northeast-2 - Seoul"
-	help
-	  This option specifies the Asia-Pacific northeast-2 region.
-	  The data center is located in Seoul, South Korea.
-
-config TERRAFORM_AWS_REGION_AP_NORTHEAST_3
-	bool "ap-northeast-3 - Osaka"
-	help
-	  This option specifies the Asia-Pacific northeast-3 region.
-	  The data center is located in Osaka, Japan.
-
-config TERRAFORM_AWS_REGION_AP_SOUTH_1
-	bool "ap-south-1 - Mumbai"
-	help
-	  This option specifies the Asia-Pacific south-1 region.
-	  The data center is located in Mumbai, India.
-
-config TERRAFORM_AWS_REGION_AP_SOUTHEAST_1
-	bool "ap-southeast-1 - Singapore"
-	help
-	  This option specifies the Asia-Pacific southeast-1 region.
-	  The data center is located in the Republic of Singapore.
-
-config TERRAFORM_AWS_REGION_AP_SOUTHEAST_2
-	bool "ap-southeast-1 - Sydney"
-	help
-	  This option specifies the Asia-Pacific southeast-2 region.
-	  The data center is located in Sydney, Australia.
-
-config TERRAFORM_AWS_REGION_CA_CENTRAL_1
-	bool "ca-central-1 - Central"
-	help
-	  This option specifies the Canada central-1 region.
-	  The data center is located in Montreal, Quebec.
-
-config TERRAFORM_AWS_REGION_EU_CENTRAL_1
-	bool "eu-central-1 - Frankfurt"
-	help
-	  This option specifies the European Union central-1 region.
-	  The data center is located in Frankfurt, Germany.
-
-config TERRAFORM_AWS_REGION_EU_NORTH_1
-	bool "eu-north-1 - Stockholm"
-	help
-	  This option specifies the European Union north-1 region.
-	  The data center is located in Stockholm, Sweden.
-
-config TERRAFORM_AWS_REGION_EU_WEST_1
-	bool "eu-west-1 - Ireland"
-	help
-	  This option specifies the European Union west-1 region.
-	  The data center is located in Dublin, Republic of Ireland.
-
-config TERRAFORM_AWS_REGION_EU_WEST_2
-	bool "eu-west-2 - London"
-	help
-	  This option specifies the European Union west-2 region.
-	  The data center is located in London, United Kingdom.
-
-config TERRAFORM_AWS_REGION_EU_WEST_3
-	bool "eu-west-3 - Paris"
-	help
-	  This option specifies the European Union west-3 region.
-	  The data center is located in Paris, France.
-
-config TERRAFORM_AWS_REGION_SA_EAST_1
-	bool "sa-east-1 - Sao Paulo"
-	help
-	  This option specifies the South America east-1 region.
-	  The data center is located in São Paulo, Brazil.
-
-config TERRAFORM_AWS_REGION_US_EAST_1
-	bool "us-east-1 - N. Virginia"
-	help
-	  This option specifies the United States east-1 region.
-	  Multiple data centers are located in the US state of
-	  Virginia.
-
-config TERRAFORM_AWS_REGION_US_EAST_2
-	bool "us-east-2 - Ohio"
-	help
-	  This option specifies the United States east-2 region.
-	  The data center is located in Columbus, Ohio, US.
-
-config TERRAFORM_AWS_REGION_US_WEST_1
-	bool "us-west-1 - North California"
-	help
-	  This option specifies the United States west-1 region.
-	  The data center is located in San Francisco, California,
-	  US.
-
-config TERRAFORM_AWS_REGION_US_WEST_2
-	bool "us-west-2 - Oregon"
-	help
-	  This option specifies the United States west-2 region.
-	  Multiple data centers are located in the US state of
-	  Oregon.
-
-endchoice
-
-config TERRAFORM_AWS_REGION
-	string
-	output yaml
-	default "ap-northeast-1" if TERRAFORM_AWS_REGION_AP_NORTHEAST_1
-	default "ap-northeast-2" if TERRAFORM_AWS_REGION_AP_NORTHEAST_2
-	default "ap-northeast-3" if TERRAFORM_AWS_REGION_AP_NORTHEAST_3
-	default "ap-south-1" if TERRAFORM_AWS_REGION_AP_SOUTH_1
-	default "ap-southeast-1" if TERRAFORM_AWS_REGION_AP_SOUTHEAST_1
-	default "ap-southeast-2" if TERRAFORM_AWS_REGION_AP_SOUTHEAST_2
-	default "ca-central-1" if TERRAFORM_AWS_REGION_CA_CENTRAL_1
-	default "eu-central-1" if TERRAFORM_AWS_REGION_EU_CENTRAL_1
-	default "eu-north-1" if TERRAFORM_AWS_REGION_EU_NORTH_1
-	default "eu-west-1" if TERRAFORM_AWS_REGION_EU_WEST_1
-	default "eu-west-2" if TERRAFORM_AWS_REGION_EU_WEST_2
-	default "eu-west-3" if TERRAFORM_AWS_REGION_EU_WEST_3
-	default "sa-east-1" if TERRAFORM_AWS_REGION_SA_EAST_1
-	default "us-east-1" if TERRAFORM_AWS_REGION_US_EAST_1
-	default "us-east-2" if TERRAFORM_AWS_REGION_US_EAST_2
-	default "us-west-1" if TERRAFORM_AWS_REGION_US_WEST_1
-	default "us-west-2" if TERRAFORM_AWS_REGION_US_WEST_2
-
-if TERRAFORM_AWS_REGION_AP_NORTHEAST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1A
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1A
-	bool "ap-northeast-1a"
-	help
-	  This option selects the ap-northeast-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1C
-	bool "ap-northeast-1c"
-	help
-	  This option selects the ap-northeast-1c availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1D
-	bool "ap-northeast-1d"
-	help
-	  This option selects the ap-northeast-1d availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_NORTHEAST_1
-
-if TERRAFORM_AWS_REGION_AP_NORTHEAST_2
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2A
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2A
-	bool "ap-northeast-2a"
-	help
-	  This option selects the ap-northeast-2a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2B
-	bool "ap-northeast-2b"
-	help
-	  This option selects the ap-northeast-2b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2C
-	bool "ap-northeast-2c"
-	help
-	  This option selects the ap-northeast-2c availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2D
-	bool "ap-northeast-2d"
-	help
-	  This option selects the ap-northeast-2d availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_NORTHEAST_2
-
-if TERRAFORM_AWS_REGION_AP_NORTHEAST_3
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3A
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3A
-	bool "ap-northeast-3a"
-	help
-	  This option selects the ap-northeast-3a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3B
-	bool "ap-northeast-3b"
-	help
-	  This option selects the ap-northeast-3b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3C
-	bool "ap-northeast-3c"
-	help
-	  This option selects the ap-northeast-3c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_NORTHEAST_3
-
-if TERRAFORM_AWS_REGION_AP_SOUTH_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1A
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1A
-	bool "ap-south-1a"
-	help
-	  This option selects the ap-south-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1B
-	bool "ap-south-1b"
-	help
-	  This option selects the ap-south-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1C
-	bool "ap-south-1c"
-	help
-	  This option selects the ap-south-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_SOUTH_1
-
-if TERRAFORM_AWS_REGION_AP_SOUTHEAST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1A
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1A
-	bool "ap-southeast-1a"
-	help
-	  This option selects the ap-southeast-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1B
-	bool "ap-southeast-1b"
-	help
-	  This option selects the ap-southeast-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1C
-	bool "ap-southeast-1c"
-	help
-	  This option selects the ap-southeast-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_SOUTHEAST_1
-
-if TERRAFORM_AWS_REGION_AP_SOUTHEAST_2
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2A
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2A
-	bool "ap-southeast-2a"
-	help
-	  This option selects the ap-southeast-2a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2B
-	bool "ap-southeast-2b"
-	help
-	  This option selects the ap-southeast-2b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2C
-	bool "ap-southeast-2c"
-	help
-	  This option selects the ap-southeast-2c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_AP_SOUTHEAST_2
+# AWS location configuration
 
-if TERRAFORM_AWS_REGION_CA_CENTRAL_1
+# Include dynamically generated regions
+# Generated by 'make cloud-config' from AWS API
+source "terraform/aws/kconfigs/Kconfig.location.generated"
 
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1A
-
-config TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1A
-	bool "ca-central-1a"
-	help
-	  This option selects the ca-central-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1B
-	bool "ca-central-1b"
-	help
-	  This option selects the ca-central-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1D
-	bool "ca-central-1d"
-	help
-	  This option selects the ca-central-1d availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_CA_CENTRAL_1
-
-if TERRAFORM_AWS_REGION_EU_CENTRAL_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1A
-
-config TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1A
-	bool "eu-central-1a"
-	help
-	  This option selects the eu-central-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1B
-	bool "eu-central-1b"
-	help
-	  This option selects the eu-central-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1C
-	bool "eu-central-1c"
-	help
-	  This option selects the eu-central-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_EU_CENTRAL_1
-
-if TERRAFORM_AWS_REGION_EU_NORTH_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_EU_NORTH_1A
-
-config TERRAFORM_AWS_AV_ZONE_EU_NORTH_1A
-	bool "eu-north-1a"
-	help
-	  This option selects the eu-north-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_NORTH_1B
-	bool "eu-north-1b"
-	help
-	  This option selects the eu-north-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_NORTH_1C
-	bool "eu-north-1c"
-	help
-	  This option selects the eu-north-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_EU_NORTH_1
-
-if TERRAFORM_AWS_REGION_EU_WEST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_EU_WEST_1A
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_1A
-	bool "eu-west-1a"
-	help
-	  This option selects the eu-west-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_1B
-	bool "eu-west-1b"
-	help
-	  This option selects the eu-west-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_1C
-	bool "eu-west-1c"
-	help
-	  This option selects the eu-west-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_EU_WEST_1
-
-if TERRAFORM_AWS_REGION_EU_WEST_2
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_EU_WEST_2A
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_2A
-	bool "eu-west-2a"
-	help
-	  This option selects the eu-west-2a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_2B
-	bool "eu-west-2b"
-	help
-	  This option selects the eu-west-2b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_2C
-	bool "eu-west-2c"
-	help
-	  This option selects the eu-west-2c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_EU_WEST_2
-
-if TERRAFORM_AWS_REGION_EU_WEST_3
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_EU_WEST_3A
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_3A
-	bool "eu-west-3a"
-	help
-	  This option selects the eu-west-3a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_3B
-	bool "eu-west-3b"
+config TERRAFORM_AWS_AVAILABILITY_ZONE
+	string "AWS availability zone"
+	depends on TERRAFORM_AWS
+	default "a"
 	help
-	  This option selects the eu-west-3b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_EU_WEST_3C
-	bool "eu-west-3c"
-	help
-	  This option selects the eu-west-3c availability zone.
-
-endchoice
+	  Enter the AWS availability zone name for your region. The
+	  list of supported availability zones is region-specific, so
+	  to validate a particular name, use the aws client with your
+	  chosen region:
 
-endif # TERRAFORM_AWS_REGION_EU_WEST_3
-
-if TERRAFORM_AWS_REGION_SA_EAST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_SA_EAST_1A
-
-config TERRAFORM_AWS_AV_ZONE_SA_EAST_1A
-	bool "sa-east-1a"
-	help
-	  This option selects the sa-east-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_SA_EAST_1B
-	bool "sa-east-1b"
-	help
-	  This option selects the sa-east-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_SA_EAST_1C
-	bool "sa-east-1c"
-	help
-	  This option selects the sa-east-1c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_SA_EAST_1
-
-if TERRAFORM_AWS_REGION_US_EAST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_US_EAST_1A
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1A
-	bool "us-east-1a"
-	help
-	  This option selects the us-east-1a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1B
-	bool "us-east-1b"
-	help
-	  This option selects the us-east-1b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1C
-	bool "us-east-1c"
-	help
-	  This option selects the us-east-1c availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1D
-	bool "us-east-1d"
-	help
-	  This option selects the us-east-1d availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1E
-	bool "us-east-1e"
-	help
-	  This option selects the us-east-1e availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_1F
-	bool "us-east-1f"
-	help
-	  This option selects the us-east-1f availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_US_EAST_1
-
-if TERRAFORM_AWS_REGION_US_EAST_2
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_US_EAST_2A
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_2A
-	bool "us-east-2a"
-	help
-	  This option selects the us-east-2a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_2B
-	bool "us-east-2b"
-	help
-	  This option selects the us-east-2a availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_EAST_2C
-	bool "us-east-2c"
-	help
-	  This option selects the us-east-2c availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_US_EAST_2
-
-if TERRAFORM_AWS_REGION_US_WEST_1
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_US_WEST_1B
-	help
-	  This option sets the AWS availablity zone to the specified value.
-	  If you wish to expand on this list send a patch after reading this
-	  list:
-
-	  https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
-	  https://gist.github.com/neilstuartcraig/0ccefcf0887f29b7f240
-
-config TERRAFORM_AWS_AV_ZONE_US_WEST_1B
-	bool "us-west-1b"
-	help
-	  This option selects the us-west-1b availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_US_WEST_1
-
-if TERRAFORM_AWS_REGION_US_WEST_2
-
-choice
-	prompt "AWS availability zone"
-	default TERRAFORM_AWS_AV_ZONE_US_WEST_2B
-	help
-	  This option sets the AWS availablity zone to the specified value.
-	  If you wish to expand on this list send a patch after reading this
-	  list:
-
-	  https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
-	  https://gist.github.com/neilstuartcraig/0ccefcf0887f29b7f240
-
-config TERRAFORM_AWS_AV_ZONE_US_WEST_2B
-	bool "us-west-2b"
-	help
-	  This option selects the us-west-2b availability zone.
-
-config TERRAFORM_AWS_AV_ZONE_US_WEST_2D
-	bool "us-west-2d"
-	help
-	  This option selects the us-west-2d availability zone.
-
-endchoice
-
-endif # TERRAFORM_AWS_REGION_US_WEST_2
+	    aws ec2 describe-availability-zones --region <region-name>
 
-config TERRAFORM_AWS_AV_ZONE
-	string
-	output yaml
-	default "ap-northeast-1a" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1A
-	default "ap-northeast-1c" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1C
-	default "ap-northeast-1d" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_1D
-	default "ap-northeast-2a" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2A
-	default "ap-northeast-2b" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2B
-	default "ap-northeast-2c" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2C
-	default "ap-northeast-2d" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_2D
-	default "ap-northeast-3a" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3A
-	default "ap-northeast-3b" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3B
-	default "ap-northeast-3c" if TERRAFORM_AWS_AV_ZONE_AP_NORTHEAST_3C
-	default "ap-south-1a" if TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1A
-	default "ap-south-1b" if TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1B
-	default "ap-south-1c" if TERRAFORM_AWS_AV_ZONE_AP_SOUTH_1C
-	default "ap-southeast-1a" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1A
-	default "ap-southeast-1b" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1B
-	default "ap-southeast-1c" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_1C
-	default "ap-southeast-2a" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2A
-	default "ap-southeast-2b" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2B
-	default "ap-southeast-2c" if TERRAFORM_AWS_AV_ZONE_AP_SOUTHEAST_2C
-	default "ca-central-1a" if TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1A
-	default "ca-central-1b" if TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1B
-	default "ca-central-1d" if TERRAFORM_AWS_AV_ZONE_CA_CENTRAL_1D
-	default "eu-central-1a" if TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1A
-	default "eu-central-1b" if TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1B
-	default "eu-central-1c" if TERRAFORM_AWS_AV_ZONE_EU_CENTRAL_1C
-	default "eu-north-1a" if TERRAFORM_AWS_AV_ZONE_EU_NORTH_1A
-	default "eu-north-1b" if TERRAFORM_AWS_AV_ZONE_EU_NORTH_1B
-	default "eu-north-1c" if TERRAFORM_AWS_AV_ZONE_EU_NORTH_1C
-	default "eu-west-1a" if TERRAFORM_AWS_AV_ZONE_EU_WEST_1A
-	default "eu-west-1b" if TERRAFORM_AWS_AV_ZONE_EU_WEST_1B
-	default "eu-west-1c" if TERRAFORM_AWS_AV_ZONE_EU_WEST_1C
-	default "eu-west-2a" if TERRAFORM_AWS_AV_ZONE_EU_WEST_2A
-	default "eu-west-2b" if TERRAFORM_AWS_AV_ZONE_EU_WEST_2B
-	default "eu-west-2c" if TERRAFORM_AWS_AV_ZONE_EU_WEST_2C
-	default "eu-west-3a" if TERRAFORM_AWS_AV_ZONE_EU_WEST_3A
-	default "eu-west-3b" if TERRAFORM_AWS_AV_ZONE_EU_WEST_3B
-	default "eu-west-3c" if TERRAFORM_AWS_AV_ZONE_EU_WEST_3C
-	default "sa-east-1a" if TERRAFORM_AWS_AV_ZONE_SA_EAST_1A
-	default "sa-east-1b" if TERRAFORM_AWS_AV_ZONE_SA_EAST_1B
-	default "sa-east-1c" if TERRAFORM_AWS_AV_ZONE_SA_EAST_1C
-	default "us-east-1a" if TERRAFORM_AWS_AV_ZONE_US_EAST_1A
-	default "us-east-1b" if TERRAFORM_AWS_AV_ZONE_US_EAST_1B
-	default "us-east-1c" if TERRAFORM_AWS_AV_ZONE_US_EAST_1C
-	default "us-east-1d" if TERRAFORM_AWS_AV_ZONE_US_EAST_1D
-	default "us-east-1e" if TERRAFORM_AWS_AV_ZONE_US_EAST_1E
-	default "us-east-1f" if TERRAFORM_AWS_AV_ZONE_US_EAST_1F
-	default "us-east-2a" if TERRAFORM_AWS_AV_ZONE_US_EAST_2A
-	default "us-east-2b" if TERRAFORM_AWS_AV_ZONE_US_EAST_2B
-	default "us-east-2c" if TERRAFORM_AWS_AV_ZONE_US_EAST_2C
-	default "us-west-1b" if TERRAFORM_AWS_AV_ZONE_US_WEST_1B
-	default "us-west-2b" if TERRAFORM_AWS_AV_ZONE_US_WEST_2B
-	default "us-west-2d" if TERRAFORM_AWS_AV_ZONE_US_WEST_2D
+	  In general, AWS region names are lower-case letters only.
+	  Sometimes, they include a number suffix (see us-east-2a, for
+	  example).
\ No newline at end of file
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.c7a b/terraform/aws/kconfigs/instance-types/Kconfig.c7a
deleted file mode 100644
index 147999d9..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.c7a
+++ /dev/null
@@ -1,28 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_C7A
-
-choice
-	prompt "AWS instance size"
-	default TERRAFORM_AWS_INSTANCE_SIZE_C7A_8XLARGE
-	help
-	  Add storage by increasing the number of EBS volumes per
-	  instance.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_C7A_8XLARGE
-	bool "c7a.8xlarge"
-	help
-	  32 core, 64 GiB RAM, EBS drives.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_C7A_METAL_48XL
-	bool "c7a.metal-48xl"
-	help
-	  192 core, 384 GiB RAM, EBS drive.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "c7a.8xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_C7A_8XLARGE
-	default "c7a.metal-48xl" if TERRAFORM_AWS_INSTANCE_SIZE_C7A_METAL_48XL
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_C7A
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.i4i b/terraform/aws/kconfigs/instance-types/Kconfig.i4i
deleted file mode 100644
index 3f7b2218..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.i4i
+++ /dev/null
@@ -1,33 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_I4I
-
-choice
-	prompt "AWS instance type"
-	default TERRAFORM_AWS_INSTANCE_SIZE_I4I_4XLARGE
-
-config TERRAFORM_AWS_INSTANCE_SIZE_I4I_LARGE
-	bool "i4i.large"
-	help
-	  16 GiB RAM, 2 vcpus, 1 x 468 AWS Nitro SSD, 10 Gbps Net, 10 Gbps EBS.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_I4I_4XLARGE
-	bool "i4i.4xlarge"
-	help
-	  128 GiB RAM, 16 vcpus, 1 x 3,750 AWS Nitro SSD, 25 Gbps Net,
-	  10 Gbps EBS.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_I4I_METAL
-	bool "i4i.metal"
-	help
-	  1024 GiB RAM, 128 real cpus?, 8 x 3,750 AWS Nitro SSD,
-	  75 Gbps Net, 40 Gbps EBS. The bees' knees I guess.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "i4i.large" if TERRAFORM_AWS_INSTANCE_SIZE_I4I_LARGE
-	default "i4i.4xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_I4I_4XLARGE
-	default "i4i.metal" if TERRAFORM_AWS_INSTANCE_SIZE_I4I_METAL
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_I4I
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.im4gn b/terraform/aws/kconfigs/instance-types/Kconfig.im4gn
deleted file mode 100644
index e224bdca..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.im4gn
+++ /dev/null
@@ -1,25 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_IM4GN
-
-choice
-	prompt "AWS instance size"
-	default TERRAFORM_AWS_INSTANCE_SIZE_IM4GN_LARGE
-
-config TERRAFORM_AWS_INSTANCE_SIZE_IM4GN_LARGE
-	bool "im4gn.large"
-	help
-	  8 GiB RAM, 2vCPUs, 1 x 937 GiB NVMe SSD, 25 Gbps Net, 9.5 Gbps EBS.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_IM4GN_4XLARGE
-	bool "im4gn.4xlarge"
-	help
-	  64 GiB RAM, 16 vcpus, 1 x 7500 NVMe SSD, 25 Gbps Net, 9.5 Gbps EBS.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "im4gn.large" if TERRAFORM_AWS_INSTANCE_SIZE_IM4GN_LARGE
-	default "im4gn.4xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_IM4GN_4XLARGE
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_IM4GN
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.is4gen b/terraform/aws/kconfigs/instance-types/Kconfig.is4gen
deleted file mode 100644
index 4fdca17b..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.is4gen
+++ /dev/null
@@ -1,25 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_IS4GEN
-
-choice
-	prompt "AWS instance size"
-	default TERRAFORM_AWS_INSTANCE_SIZE_IS4GEN_MEDIUM
-
-config TERRAFORM_AWS_INSTANCE_SIZE_IS4GEN_MEDIUM
-	bool "is4gen.medium"
-	help
-	  6 GiB RAM, 1vCPU, 1 x 937 GiB NVMe SSD, 25 Gbps Net, 9.6 Gbps EBS.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_IS4GEN_8XLARGE
-	bool "is4gen.8xlarge"
-	help
-	  192 GiB RAM, 32 vCPUs, 4 x 7500 NVMe SSD, 50 Gbps Net, 19 Gbps EBS.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "is4gen.medium" if TERRAFORM_AWS_INSTANCE_SIZE_IS4GEN_MEDIUM
-	default "is4gen.8xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_IS4GEN_8XLARGE
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_IS4GEN
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.m5 b/terraform/aws/kconfigs/instance-types/Kconfig.m5
deleted file mode 100644
index 534a20e7..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.m5
+++ /dev/null
@@ -1,48 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_M5
-
-choice
-	prompt "AWS instance type"
-	default TERRAFORM_AWS_INSTANCE_SIZE_M5AD_4XLARGE
-	help
-	  Add storage by increasing the number of EBS volumes per
-	  instance.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M5AD_LARGE
-	bool "m5ad.large"
-	depends on TARGET_ARCH_X86_64
-	help
-	  8 GiB RAM, 2 AMD vcpus, 1 10 GiB main drive, up to 10 Gbps
-	  network speed, and one 75 GiB NVMe drive.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M5AD_XLARGE
-	bool "m5ad.xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  16 GiB RAM, 4 AMD vcpus, 1 10 GiB main drive, up to 10 Gbps
-	  network speed, and one 150 GiB NVMe drive.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M5AD_2XLARGE
-	bool "m5ad.2xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  32 GiB RAM, 8 AMD vcpus, 1 10 GiB main drive, up to 10 Gbps
-	  network speed, and one 300 GiB NVMe drive.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M5AD_4XLARGE
-	bool "m5ad.4xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  64 GiB RAM, 16 AMD vcpus, 1 10 GiB main drive, up to 10 Gbps
-	  and two 300 GiB NVMe drives.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "m5ad.large" if TERRAFORM_AWS_INSTANCE_SIZE_M5AD_LARGE
-	default "m5ad.xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M5AD_XLARGE
-	default "m5ad.2xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M5AD_2XLARGE
-	default "m5ad.4xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M5AD_4XLARGE
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_M5
diff --git a/terraform/aws/kconfigs/instance-types/Kconfig.m7a b/terraform/aws/kconfigs/instance-types/Kconfig.m7a
deleted file mode 100644
index fd7bd6f4..00000000
--- a/terraform/aws/kconfigs/instance-types/Kconfig.m7a
+++ /dev/null
@@ -1,57 +0,0 @@
-if TERRAFORM_AWS_INSTANCE_TYPE_M7A
-
-choice
-	prompt "AWS instance type"
-	default TERRAFORM_AWS_INSTANCE_SIZE_M7A_XLARGE
-	help
-	  Add storage by increasing the number of EBS volumes per
-	  instance.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M7A_MEDIUM
-	bool "m7a.medium"
-	depends on TARGET_ARCH_X86_64
-	help
-	  4 GiB RAM, 1 AMD Ryzen vcpu, 1 10 GiB main drive, and up to
-	  12.5 Gbs network speed.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M7A_LARGE
-	bool "m7a.large"
-	depends on TARGET_ARCH_X86_64
-	help
-	  8 GiB RAM, 2 AMD Ryzen vcpus, 1 10 GiB main drive, and up to
-	  12.5 Gbs network speed.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M7A_XLARGE
-	bool "m7a.xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  16 GiB RAM, 4 AMD Ryzen vcpus, 1 10 GiB main drive, and up to
-	  12.5 Gbs network speed.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M7A_2XLARGE
-	bool "m7a.2xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  32 GiB RAM, 8 AMD Ryzen vcpus, 1 10 GiB main drive, and up to
-	  12.5 Gbs network speed.
-
-config TERRAFORM_AWS_INSTANCE_SIZE_M7A_4XLARGE
-	bool "m7a.4xlarge"
-	depends on TARGET_ARCH_X86_64
-	help
-	  64 GiB RAM, 16 AMD Ryzen vcpus, 1 10 GiB main drive, and up to
-	  12.5 Gbs network speed.
-
-endchoice
-
-config TERRAFORM_AWS_INSTANCE_TYPE
-	string
-	output yaml
-	default "m7a.medium" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_MEDIUM
-	default "m7a.large" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_LARGE
-	default "m7a.xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_XLARGE
-	default "m7a.xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_XLARGE
-	default "m7a.2xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_2XLARGE
-	default "m7a.4xlarge" if TERRAFORM_AWS_INSTANCE_SIZE_M7A_4XLARGE
-
-endif # TERRAFORM_AWS_INSTANCE_TYPE_M7A
-- 
2.50.1


  reply	other threads:[~2025-09-09  0:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09  0:56 [PATCH v3 0/3] aws: add dynamic kconfig support Luis Chamberlain
2025-09-09  0:56 ` Luis Chamberlain [this message]
2025-09-10 20:53   ` [PATCH v3 1/3] aws: add dynamic cloud configuration support Chuck Lever
2025-09-09  0:56 ` [PATCH v3 2/3] aws: enable GPU AMI support for GPU instances Luis Chamberlain
2025-09-09  0:56 ` [PATCH v3 3/3] cloud: run make cloud-update Luis Chamberlain
2025-09-10 14:48 ` [PATCH v3 0/3] aws: add dynamic kconfig support Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250909005644.798127-2-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox