aws-samples / aws-samples/sample-strands-chaos-engineering-agents

Runtime error: tool=<<function get_aws_region at 0x7f253eb7dc60>> | unrecognized tool specification when importing agents.

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
2
Avg merge
43m
Merged PRs (30d)
1

Description

The error indicates that get_aws_region is not properly decorated as a tool in shared/config.py.

The get_aws_region function is missing the @tool decorator. Fix is:

75, 75: logger.error(error_msg)
76, 76: raise RuntimeError(error_msg)
77, 77:
+ 78: @tool

78, 79: def get_aws_region() -> str:
79, 80: """
80, 81: Get AWS region with precedence: CLI argument > Environment variable > Stack region > Default.
81, 82:
82, 83: Returns:
83, 84: str: AWS region name to use
84, 85: """
85, 86: global _config_cache

Contributor guide

Open the contributing guide

Research direction

Open shared/config.py and inspect get_aws_region, then reproduce the error while importing agents. Confirm that the tool specification is accepted after the indicated decorator change and verify that importing the agents no longer raises the reported runtime error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.