def pointRootToBucket(self):

        # Make sure the correct bucket exists and is ours
        bucket = AWSBucket(self.accessKey, self.secretKey, self.domain)
        endpoint = bucket.websiteEndpoint()
        endpointDomain = endpoint[len(self.dnsDomain):]

        # Remove old A record for the root domain
        for record in self.records():
            if record.type in ["A", "CNAME"] and record.name == self.dnsDomain:
                self.delete(record)

        # Create new root domain record that points to the bucket
        self.createAlias(self.dnsDomain, "A", HOSTED_ZONES[endpointDomain], endpointDomain)
dataset/ETHPy150Open koenbok/Cactus/cactus/deployment/s3/domain.py/AWSDomain.pointRootToBucket/original