Skip to content

Adding new profile should add newline before #2996

@J00MZ

Description

@J00MZ

Have multiple IAM users configured in ~/.aws/credentials

Added IAM user as follows:
aws configure --profile NEW_PROFILE_NAME
Completed sucessfully as expected.

However, next step of running a command resulted in error:

PS C:\WINDOWS\system32> aws --profile NEW_PROFILE_NAME s3 ls
Unable to locate credentials. You can configure credentials by running "aws configure".

Checking ~/.aws/credentials file showed new creds were appended to file without newline as follows:

[OLD_PROFILE_NAME]
aws_access_key_id = AAAAAAAAAAAAAAAAAAAA
aws_secret_access_key = KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
region=XX-east-X
toolkit_artifact_guid=11111111-1111-1111-1111-111111111111[NEW_PROFILE_NAME]
aws_access_key_id = BBBBBBBBBBBBBBBBBBBB
aws_secret_access_key = JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ

IMHO this is easily fixable by adding a newline echo before the new creds

CLI version: aws-cli/1.12.2 Python/2.7.14 Windows/10 botocore/1.8.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions