aws-amplify / aws-amplify/amplify-cli

`amplify configure` removes existing comments from ~/.aws/config

Open
#1,245 3 comments 0 reactions 0 assignees View on GitHub
feature-request good first issue p4 platform-config
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Describe the bug**
I use many different AWS profiles and so I keep some information about the different accounts as comments in my `~/.aws/config` file. When running `amplify configure` it strips my `~/.aws/config` file clean of any comments, this is different to the behaviour of `aws configure --profile profile_name` which simply attaches the new profile to the end of my `~/.aws/config` file without removing anything.

**To Reproduce**
Steps to reproduce the behavior:
1. Add some comments to your `~/.aws/config` file like `$ echo '# Some useful account information' >> ~/.aws/config`

2. Run `amplify configure`
3. Confirm that your comments are gone `$ tail -n 1 ~/.aws/config`

**Expected behavior**
`amplify configure` should merely append the profile information to the file without modifying anything, same as `aws configure`.

**Desktop (please complete the following information):**
```bash
# Some system information:
$ amplify --version
1.5.1

$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.1 Tessa
Release: 19.1
Codename: tessa

$ uname -a
Linux ide 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.