aws / aws/amazon-q-developer-cli

bug: AWS CLI Parameter Validation Error for All Describe Commands

Aperta
#3,092 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug q chat
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

macos 26.0

### Expected behaviour

# Bug Report: AWS CLI Parameter Validation Error for All Describe Commands

## Description
The Q Developer CLI generates AWS CLI `describe-*` commands with incorrect parameter casing in filter specifications. All describe commands fail with parameter validation errors because lowercase parameter names (`name`, `values`) are used instead of the required Pascal-case format (`Name`, `Values`).

Image

## Example Command Executed
```bash
aws ec2 describe-subnets \
--filters '[{"name":"tag:Name","values":["*app-a*"]}]' \
--profile test \
--region us-east-1
```

## Error Output
```
Execution failed after 0.341s:

Parameter validation failed:
Unknown parameter in Filters[0]: "name", must be one of: Name, Values
Unknown parameter in Filters[0]: "values", must be one of: Name, Values
```

## Expected Behavior
Q Developer CLI should generate AWS CLI commands with correctly cased filter parameters:
```bash
aws ec2 describe-subnets \
--filters '[{"Name":"tag:Name","Values":["*app-a*"]}]' \
--profile test \
--region us-east-1
```

### Actual behaviour

## Actual Behavior
All describe commands are generated with lowercase `name` and `values` keys, causing systematic parameter validation failures across all AWS services.

## Impact
- **Severity**: Low (annoying but easily worked around)
- **Scope**: All AWS describe commands that use filters (EC2, RDS, ECS, Lambda, etc.)
- **User Impact**: Users must manually correct casing before commands will execute successfully

## Root Cause
The Q Developer CLI appears to have a systematic issue where it generates filter parameters using lowercase JSON keys instead of the Pascal-case format required by AWS CLI.

## Proposed Solution
1. Update the Q Developer CLI filter parameter generation logic to use Pascal-case keys (`Name`, `Values`)
2. Add validation to ensure generated AWS CLI commands conform to AWS CLI parameter specifications
3. Implement automated testing for describe commands across multiple AWS services

## Affected Services (Non-exhaustive)
- EC2: `describe-instances`, `describe-subnets`, `describe-vpcs`, `describe-security-groups`
- RDS: `describe-db-instances`, `describe-db-clusters`
- ECS: `describe-clusters`, `describe-services`, `describe-tasks`
- Lambda: `list-functions` (with filters)
- And any other service using the `--filters` parameter

## Workaround
Manually correct the casing in generated commands before execution:
- Change `"name"` → `"Name"`
- Change `"values"` → `"Values"`

### Steps to reproduce

## Reproduction Steps
1. Use Q Developer CLI to execute any AWS describe command with filters
2. Observe that generated commands use lowercase JSON keys in filter parameters
3. Command fails with parameter validation error

### Environment

```yaml
## Environment
- **Tool**: Q Developer CLI / use_aws tool
- **Service**: AWS CLI (all services)
- **Affected Operations**: All `describe-*` commands that use filters
- **Profile**: test
- **Region**: us-east-1
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il problema con lo strumento `use_aws` e il comando di esempio `aws ec2 describe-subnets`. Traccia dove vengono generati i comandi Describe filtrati, quindi verifica che le chiavi dei filtri usino `Name` e `Values` e aggiungi una copertura per comandi Describe rappresentativi tra i servizi AWS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, rust
Ambito
cli, cloud
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.