lib/plugins/aws/deployList/index.js/AwsDeployList/listDeployments
class AwsDeployList:  listDeployments() {
    const service = this.serverless.service.service;
    const stage = this.provider.getStage();
    const prefix = this.provider.getDeploymentPrefix();

    return this.provider
      .request('S3', 'listObjectsV2', {
        Bucket: this.bucketName,
        Prefix: `${prefix}/${service}/${stage}`,
      })
      .then(response => {
        const directoryRegex = new RegExp('(.+)-(.+-.+-.+)');
        const deployments = findAndGroupDeployments(response, prefix, service, stage);

        if (deployments.length === 0) {
          this.serverless.cli.log("Couldn't find any existing deployments.");
          this.serverless.cli.log('Please verify that stage and region are correct.');
          return BbPromise.resolve();
        }
        this.serverless.cli.log('Listing deployments:');
        deployments.forEach(deployment => {
          this.serverless.cli.log('-------------');
          const match = deployment[0].directory.match(directoryRegex);
          this.serverless.cli.log(`Timestamp: ${match[1]}`);
          this.serverless.cli.log(`Datetime: ${match[2]}`);
          this.serverless.cli.log('Files:');
          deployment.forEach(entry => {
            this.serverless.cli.log(`- ${entry.file}`);
          });
        });
        return BbPromise.resolve();
      });
  }