Skip to content

profiles

The profiles command lists all AWS profiles that are configured in your clanker configuration file. This provides a quick overview of available profiles, their regions, and which one is set as the default.

Usage

bash
clanker profiles

Output

The command displays each configured AWS profile along with its region, description, and whether it is the default profile.

Example output:

Available AWS Profiles (default: dev):

  dev (default)
    Region: us-east-1
    Description: Development environment

  staging
    Region: us-east-1
    Description: Staging environment

  production
    Region: us-west-2
    Description: Production environment

Usage: clanker ask --profile <profile-name> "your question"

Configuration

AWS profiles are defined in ~/.clanker.yaml under the aws section. The profiles command reads from this configuration, not from your ~/.aws/config or ~/.aws/credentials files directly.

yaml
aws:
  default_profile: dev
  profiles:
    dev:
      region: us-east-1
      description: Development environment
    staging:
      region: us-east-1
      description: Staging environment
    production:
      region: us-west-2
      description: Production environment

TIP

To discover AWS profiles available on your system (including those in ~/.aws/credentials and ~/.aws/config), use clanker config scan. The profiles command only shows profiles that have been explicitly added to your clanker configuration.

Using Profiles with Other Commands

Once profiles are configured, you can use them with the ask command via the --profile flag:

bash
# Query using the development profile
clanker ask --profile dev "what EC2 instances are running?"

# Query using the production profile
clanker ask --profile production "show me the RDS instances"

See Also

  • Configuration -- Setting up the clanker configuration file
  • config scan -- Scanning for available system credentials
  • ask -- Querying infrastructure with natural language