AWS Cloud Utilities v2 provides flexible configuration options through environment variables, configuration files, and command-line options.
Configuration is loaded in this order (later sources override earlier ones):
~/.aws-cloud-utilities.env)The easiest way to configure the tool:
aws-cloud-utilities configure
This will prompt you for:
Create ~/.aws-cloud-utilities.env with your preferred settings:
# AWS Configuration
AWS_PROFILE=default
AWS_DEFAULT_REGION=us-east-1
AWS_OUTPUT_FORMAT=table
# Performance Settings
WORKERS=4
# Logging
LOG_LEVEL=INFO
VERBOSE=false
DEBUG=false
# Output Settings
SHOW_PROGRESS=true
COLOR_OUTPUT=true
Set environment variables for temporary overrides:
# AWS settings
export AWS_PROFILE=production
export AWS_DEFAULT_REGION=eu-west-1
export AWS_OUTPUT_FORMAT=json
# Performance
export WORKERS=8
# Logging
export LOG_LEVEL=DEBUG
export VERBOSE=true
Override any setting with command-line options:
aws-cloud-utilities --profile staging --region us-west-2 --output json account info
| Option | Environment Variable | Default | Description |
|---|---|---|---|
--profile |
AWS_PROFILE |
default |
AWS profile to use |
--region |
AWS_DEFAULT_REGION |
us-east-1 |
Default AWS region |
--output |
AWS_OUTPUT_FORMAT |
table |
Output format |
| Option | Environment Variable | Default | Description |
|---|---|---|---|
| N/A | WORKERS |
4 |
Number of parallel workers |
| N/A | TIMEOUT |
30 |
Request timeout in seconds |
| N/A | RETRY_ATTEMPTS |
3 |
Number of retry attempts |
| Option | Environment Variable | Default | Description |
|---|---|---|---|
--verbose |
VERBOSE |
false |
Enable verbose output |
--debug |
DEBUG |
false |
Enable debug mode |
| N/A | LOG_LEVEL |
INFO |
Logging level |
| N/A | LOG_FILE |
None | Log file path |
| Option | Environment Variable | Default | Description |
|---|---|---|---|
| N/A | SHOW_PROGRESS |
true |
Show progress bars |
| N/A | COLOR_OUTPUT |
true |
Enable colored output |
| N/A | TABLE_MAX_WIDTH |
120 |
Maximum table width |
Configure multiple profiles with AWS CLI:
# Configure default profile
aws configure
# Configure named profile
aws configure --profile production
Then use with the tool:
aws-cloud-utilities --profile production account info
Create profile-specific configuration files:
# ~/.aws-cloud-utilities-production.env
AWS_PROFILE=production
AWS_DEFAULT_REGION=us-east-1
WORKERS=8
LOG_LEVEL=WARNING
Load with:
aws-cloud-utilities --config ~/.aws-cloud-utilities-production.env account info
Set a default region for all operations:
AWS_DEFAULT_REGION=us-west-2
Some commands support multi-region operations:
# Inventory across all regions
aws-cloud-utilities inventory resources --all-regions
# Specific regions
aws-cloud-utilities inventory resources --regions us-east-1,us-west-2,eu-west-1
table - Rich formatted tables (default)json - JSON outputyaml - YAML outputcsv - CSV format (for tabular data)# Table format settings
TABLE_MAX_WIDTH=120
TABLE_SHOW_LINES=true
# JSON format settings
JSON_INDENT=2
JSON_SORT_KEYS=true
# CSV format settings
CSV_DELIMITER=,
CSV_QUOTE_CHAR="
Adjust parallel processing:
# More workers for faster processing (uses more resources)
WORKERS=8
# Fewer workers for limited resources
WORKERS=2
Configure timeouts for different operations:
# General timeout
TIMEOUT=30
# Long-running operations
LONG_OPERATION_TIMEOUT=300
# Connection timeout
CONNECTION_TIMEOUT=10
Configure retry behavior:
RETRY_ATTEMPTS=3
RETRY_BACKOFF=2
RETRY_MAX_DELAY=60
Available log levels:
DEBUG - Detailed debugging informationINFO - General informationWARNING - Warning messagesERROR - Error messages only# Enable file logging
LOG_FILE=/var/log/aws-cloud-utilities.log
# Log rotation
LOG_MAX_SIZE=10MB
LOG_BACKUP_COUNT=5
Enable structured JSON logging:
LOG_FORMAT=json
LOG_INCLUDE_TIMESTAMP=true
LOG_INCLUDE_LEVEL=true
# Use IAM roles (recommended)
AWS_USE_IAM_ROLE=true
# Credential file location
AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials
# Config file location
AWS_CONFIG_FILE=~/.aws/config
# Session duration
AWS_SESSION_DURATION=3600
# MFA settings
AWS_MFA_SERIAL=arn:aws:iam::123456789012:mfa/username
Validate your configuration:
# Check configuration
aws-cloud-utilities info
# Test AWS connectivity
aws-cloud-utilities account info
# Validate specific profile
aws-cloud-utilities --profile production account validate
aws configure list-profiles
aws-cloud-utilities --profile correct-profile-name account info
aws-cloud-utilities account regions
aws sts get-caller-identity
aws-cloud-utilities --debug account info
Enable debug mode to see configuration loading:
aws-cloud-utilities --debug --verbose account info
This will show: