lib/plugins/aws/configCredentials/awsConfigCredentials.js/AwsConfigCredentials/saveCredentialsFile
class AwsConfigCredentials:  saveCredentialsFile() {
    // Generate the file content and add a line break at the end
    const updatedCredsFileContent = `${this.credentials.join('\n')}\n`;

    this.serverless.cli.log('Saving your AWS profile in "~/.aws/credentials"...');

    return this.serverless.utils.writeFile(this.credentialsFilePath, updatedCredsFileContent)
      .then(() => {
        // set file permissions to only readable/writable by owner (equivalent to 'chmod 600')
        // NOTE: `chmod` doesn't behave as intended on Windows, so skip if we're on Windows.
        if (os.platform() !== 'win32') {
          fs.chmodSync(
            this.credentialsFilePath,
            (fs.constants || constants).S_IRUSR | (fs.constants || constants).S_IWUSR
          );
        }

        this.serverless.cli.log(
          `Success! Your AWS access keys were stored under the "${this.options.profile}" profile.`);
      });
  }