awslabs / awslabs/aws-sdk-rust
Bad error when region has a space in it
- Dominant language
- Rust
- Stars
- 3.3k
- Forks
- 290
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 3
Description
## Bug Report
When `AWS_REGION` or `AWS_DEFAULT_REGION` has a space in it, the SDK will refuse to construct a request in a very opaque way:
```
operation="ListTables" service="dynamodb" status="construction_failure" EndpointResolutionError(InvalidUri(InvalidUriChar))
```
Since this is actually a pretty common way to have accidentally broken environment variables, we should error out on this specific case.
To reproduce:
`export AWS_REGION=' us-east-1' and run any SDK command eg. `dynamodb.list_tables()`
Contributor guide
Research direction
Search the Rust SDK for AWS_REGION and AWS_DEFAULT_REGION handling, then reproduce the issue with the shown leading-space value and a DynamoDB list_tables call. Done means the SDK reports a specific invalid-region error instead of the opaque EndpointResolutionError construction failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100