Use the AWS CLI from KosmoKrator to call AWS tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
AWS can be configured headlessly with `kosmokrator integrations:configure aws`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure aws --set access_token="$AWS_ACCESS_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor aws --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Bearer tokenbearer_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
access_token
AWS_ACCESS_TOKEN
Secret secret
yes
Access Token
base_url
AWS_BASE_URL
URL url
no
Base URL
Call AWS Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to AWS.
aws.aws_list_s3_buckets
Read read
List all S3 buckets in the AWS account. Returns bucket names, creation dates, and regions.
Get CloudWatch metric data for AWS resources. Supports querying metrics by namespace, metric name, dimensions, and time range with configurable statistics and periods.
Parameters
namespace, metric_name, statistics, start_time, end_time, period, dimensions, region
Get the current IAM user identity. Returns user ARN, account ID, and user ID. Useful for verifying credentials and understanding which AWS account is being accessed.
Maximum number of table names to return (default: 100).
exclusive_start_table_name
string
no
The first table name that this operation will evaluate. Use for pagination.
region
string
no
AWS region to query (e.g., "us-east-1"). Defaults to the configured region.
aws.aws_get_cloudwatch_metrics
Get CloudWatch metric data for AWS resources. Supports querying metrics by namespace, metric name, dimensions, and time range with configurable statistics and periods.
Pagination token from a previous response to get the next page of results.
region
string
no
AWS region to query (e.g., "us-east-1"). Defaults to the configured region.
aws.aws_get_current_user
Get the current IAM user identity. Returns user ARN, account ID, and user ID. Useful for verifying credentials and understanding which AWS account is being accessed.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.