public static void modifyOneProfile(File destination, String profileName, Profile newProfile) {
        final Map<String, Profile> modifications = Collections.singletonMap(profileName, newProfile);

        modifyProfiles(destination, modifications);
    }
Modify one profile in the existing credentials file by in-place
modification. This method will rename the existing profile if the
specified Profile has a different name.

@param destination
           The destination file to modify
@param profileName
           The name of the existing profile to be modified
@param newProfile
           The new Profile object.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/ProfilesConfigFileWriter.java