public List <string> GetCloudFrontDistributionDomains()
        {
            ListDistributionsRequest  request  = new ListDistributionsRequest();
            ListDistributionsResponse response = _client.ListDistributions(request);

            return(response.Distribution.Select(dist => dist.DomainName).ToList());
        }
        string GetDistributionIdFor(string bucketName)
        {
            distributionNameAndIds = distributionNameAndIds ??
                                     cloudFrontClient.ListDistributions()
                                     .Distribution
                                     .ToDictionary(cfd =>
                                                   cfd.DistributionConfig.S3Origin.DNSName.Replace(amazonBucketUriSuffix, ""),
                                                   cfd => cfd.Id);

            string id = null;

            distributionNameAndIds.TryGetValue(bucketName, out id);
            return(id);
        }