lib/plugins/aws/configCredentials/awsConfigCredentials.js/AwsConfigCredentials/constructor
class AwsConfigCredentials:  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;
    // Note: we're not setting the provider here as this plugin should also be
    // run when the CWD is not an AWS service

    // this will be merged with the core config commands
    this.commands = {
      config: {
        commands: {
          credentials: {
            lifecycleEvents: [
              'config',
            ],
            options: {
              key: {
                usage: 'Access key for the provider',
                shortcut: 'k',
                required: true,
              },
              secret: {
                usage: 'Secret key for the provider',
                shortcut: 's',
                required: true,
              },
              profile: {
                usage: 'Name of the profile you wish to create. Defaults to "default"',
                shortcut: 'n',
              },
              overwrite: {
                usage: 'Overwrite the existing profile configuration in the credentials file',
                shortcut: 'o',
              },
            },
          },
        },
      },
    };

    if (!os.homedir()) {
      throw new this.serverless.classes
        .Error('Can\'t find home directory on your local file system.');
    }

    this.credentialsFilePath = path.join(os.homedir(), '.aws', 'credentials');
    // Create the credentials file alongside the .aws directory if it's not yet present
    fse.ensureFileSync(this.credentialsFilePath);

    this.hooks = {
      'config:credentials:config': () => BbPromise.bind(this)
        .then(this.configureCredentials),
    };
  }