Skip to content

AWS services

Tools

use_aws

Call any AWS service operation dynamically through boto3 — the agent supplies the service, method, and parameters

Environment variables

VariableRequiredDefaultDescription
AWS_REGION / AWS_DEFAULT_REGIONyesAWS region for boto3 / Bedrock when not already set in your environment

Also respects BYPASS_TOOL_CONSENT (see Tool consent).

Examples

Requires OPENAI_API_KEY and AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION). For demos set BYPASS_TOOL_CONSENT=true.

bash
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents==0.3.1
pip install --extra-index-url https://core-packages.elsai.ai/root/ "elsai-model[openai]==2.1.0"
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents-tools==0.3.0
python
import os

from elsai import Agent
from elsai.agent import AgentConfig
from elsai_model.openai import OpenAIModel
from elsai_tools.use_aws import use_aws

agent = Agent(
    model=OpenAIModel(
        model_id="gpt-4o-mini",
        client_args={"api_key": os.environ["OPENAI_API_KEY"]},
    ),
    tools=[use_aws],
    system_prompt=(
        "Use use_aws to call AWS APIs when the user asks about AWS resources. "
        "After using tools, answer the user clearly in plain text."
    ),
    config=AgentConfig(name="aws_assistant"),
)

result = agent("List my S3 buckets and summarise how many you found.")
print(result)

Parameter reference: AWS services API.

API reference

See AWS services API for parameters and import paths.

See also

Copyright © 2026 elsai foundry.