aws / aws/amazon-q-developer-cli
use_aws tool returns 0 results while execute_bash with identical AWS CLI command returns correct results
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
Linux 5.10.245-243.979.amzn2int.x86_64 - Amazon Linux 2
### Expected behaviour
## Expected Behavior
The use_aws tool should return the same results as the AWS CLI command executed via execute_bash.
### Actual behaviour
## Actual Behavior
use_aws: 0 matches, scans ~706K records, ~1.4GB data
execute_bash: 36,415 matches, scans ~5.9M records, ~6GB data
### Steps to reproduce
## Steps to Reproduce
### Using use_aws tool (returns 0 results):
```
use_aws:
service_name: logs
operation_name: start-query
region: us-west-2
profile_name:
parameters:
query-string: "fields @timestamp, @message | filter @message like /TIMEOUT/ | sort @timestamp desc | limit 1"
log-group-names: ["/aws/lambda/"]
query-language: "CWLI"
start-time: 1733695200
end-time: 1733698800
```
Then retrieve results:
```
use_aws:
service_name: logs
operation_name: get-query-results
region: us-west-2
profile_name:
parameters:
query-id:
```
Result:
json
```
{
"recordsMatched": 0.0,
"recordsScanned": 705951.0,
"bytesScanned": 1412934691.0
}
```
### Using execute_bash with identical parameters (returns correct results):
bash
```
aws logs start-query \
--profile \
--region us-west-2 \
--query-string "fields @timestamp, @message | filter @message like /TIMEOUT/ | sort @timestamp desc | limit 1" \
--log-group-names "/aws/lambda/" \
--query-language CWLI \
--start-time 1733695200 \
--end-time 1733698800
```
Then retrieve results:
bash
```
aws logs get-query-results \
--profile \
--region us-west-2 \
--query-id
```
Result:
json
```
{
"recordsMatched": 36415.0,
"recordsScanned": 5921822.0,
"bytesScanned": 5970640479.0,
"results": [
[
{
"field": "@timestamp",
"value": "2025-12-08 22:07:24.595"
},
{
"field": "@message",
"value": "{...actual log message...}"
}
]
]
}
```
## Expected Behavior
The use_aws tool should return the same results as the AWS CLI command executed via execute_bash.
## Actual Behavior
use_aws: 0 matches, scans ~706K records, ~1.4GB data
execute_bash: 36,415 matches, scans ~5.9M records, ~6GB data
## Additional Context
Verified using same AWS credentials via sts get-caller-identity - both methods use identical account/role
Same time range (epoch timestamps 1733695200-1733698800)
Same query string, log group, and all parameters
Issue is reproducible across multiple query executions
The use_aws tool appears to execute successfully (no errors), but returns incorrect results
This suggests a parameter handling or execution context issue within the use_aws tool implementation rather than an AWS API or permissions problem.
### Environment
```yaml
[q-details]
version = "1.19.6"
hash = "65cdf611735510560feefcf49f7bd15bf6be56ba"
date = "2025-11-13T18:28:17.370251Z (25d ago)"
variant = "minimal"
[system-info]
chip = "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz"
total-cores = 24
memory = "186.59 GB"
[system-info.os.linux]
kernel_version = "5.10.245-243.979.amzn2int.x86_64"
id = "amzn"
name = "Amazon Linux"
pretty_name = "Amazon Linux 2"
version_id = "2"
version = "2"
variant = "internal"
[environment]
cwd = "/local/home/USER"
cli-path = "/local/home/USER"
os = "Linux"
shell-path = "/local/home/USER/.toolbox/tools/toolbox/1.1.2415.0/toolbox-exec"
shell-version = "4.2.46"
install-method = "toolbox"
in-ssh = true
[env-vars]
DISPLAY = ":2"
PATH =
SHELL = "/bin/bash"
TERM = "dumb"
```
Contributor guide
Assessment
This issue has not been assessed yet.