lib/plugins/aws/deploy/index.js/AwsDeploy/constructor
class AwsDeploy:  constructor(serverless, options) {
    this.serverless = serverless;
    this.options = options;
    this.provider = this.serverless.getProvider('aws');

    Object.assign(
      this,
      validate,
      createStack,
      generateArtifactDirectoryName,
      mergeCustomProviderResources,
      setBucketName,
      cleanupS3Bucket,
      uploadArtifacts,
      updateStack,
      monitorStack,
      configureStack,
      mergeIamTemplates
    );

    this.hooks = {
      'before:deploy:initialize': () => BbPromise.bind(this)
        .then(this.validate),

      'deploy:initialize': () => BbPromise.bind(this)
        .then(this.configureStack),

      'deploy:setupProviderConfiguration': () => BbPromise.bind(this)
        .then(this.createStack)
        .then(this.mergeIamTemplates),

      'before:deploy:compileFunctions': () => BbPromise.bind(this)
        .then(this.generateArtifactDirectoryName),

      'deploy:deploy': () => BbPromise.bind(this)
        .then(this.mergeCustomProviderResources)
        .then(this.setBucketName)
        .then(this.cleanupS3Bucket)
        .then(this.uploadArtifacts)
        .then(this.updateStack)
        .then(() => {
          if (this.options.noDeploy) this.serverless.cli.log('Did not deploy due to --noDeploy');
        }),
    };
  }