aws configure import --csv Prompt error, Expected header "User Name" not found (when missing `file://` prefix)
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
### Describe the bug
When executing: aws configure import --csv, the wrong file path is entered, and the "error prompt" received is wrong.
### Expected Behavior
$ aws configure import --csv aws_user_credentials.csv
$ aws configure import --csv aws_user_credentials-noexist.csv
It should prompt that the file does not exist.
Instead of: Expected header "User Name" not found
### Current Behavior
$ aws configure import --csv aws_user_credentials.csv
Expected header "User Name" not found
$ aws configure import --csv aws_user_credentials-noexist.csv
Expected header "User Name" not found
$ aws configure import --csv file://./aws_user_credentials.csv
Successfully imported 1 profile(s)
$ aws configure import --csv file://./aws_user_credentials-noexist.csv
Error parsing parameter '--csv': Unable to load paramfile file://./aws_user_credentials-noexist.csv: [Errno 2] No such file or directory: './aws_user_credentials-noexist.csv'
### Reproduction Steps
Download the certificate file (.csv) from the aws website to the current directory. Named as: aws_user_credentials.csv
$ aws configure import --csv aws_user_credentials.csv
$ aws configure import --csv aws_user_credentials-noexist.csv
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CLI version used
aws-cli/2.11.3 Python/3.11.2 Linux/5.15.0-56-generic exe/x86_64.ubuntu.20 prompt/off
### Environment details (OS name and version, etc.)
Linux ubuntu20-s1 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Contributor guide
Assessment
This issue has not been assessed yet.