> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Lambda 工具

## 代码

```python cookbook/tools/aws_lambda_tools.py theme={null}
from agno.agent import Agent
from agno.tools.aws_lambda import AWSLambdaTools

agent = Agent(
    tools=[AWSLambdaTools(region_name="us-east-1")],
    name="AWS Lambda Agent",
    show_tool_calls=True,
)

agent.print_response("列出我们 AWS 账户中的所有 Lambda 函数", markdown=True)
agent.print_response(
    "使用空负载调用 'hello-world' Lambda 函数", markdown=True
)
```

## 用法

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="设置您的 AWS 凭证">
    ```bash theme={null}
    export AWS_ACCESS_KEY_ID=xxx
    export AWS_SECRET_ACCESS_KEY=xxx
    export OPENAI_API_KEY=xxx
    ```
  </Step>

  <Step title="安装库">
    ```bash theme={null}
    pip install -U boto3 openai agno
    ```
  </Step>

  <Step title="运行 Agent">
    <CodeGroup>
      ```bash Mac theme={null}
      python cookbook/tools/aws_lambda_tools.py
      ```

      ```bash Windows theme={null}
      python cookbook/tools/aws_lambda_tools.py
      ```
    </CodeGroup>
  </Step>
</Steps>
