Skip to content

aws configure import --csv Prompt error, Expected header "User Name" not found (when missing file:// prefix)Β #7758

@qian-jiahong

Description

@qian-jiahong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    configureconfusing-errordocumentationThis is a problem with documentation.feature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions