private void writeProfile(Profile profile) {
            writeProfileName(profile.getProfileName());

            for (Entry<String, String> entry : profile.getProperties().entrySet()) {
                writeProperty(entry.getKey(), entry.getValue());
            }
        }
ProfilesConfigFileWriter still deals with legacy {@link Profile} interface so it can only
modify credential related properties. All other properties should be preserved when
modifying profiles.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java