code: def parse_bucket_info(domain):
      
      match = RGX_BUCKET.match(domain)
      if match:
          data = match.groupdict()
          return data['bucket'], data['region'] or 'us-east-1'
docs: Parse a domain name to gather the bucket name and region for an S3 bucket. Returns a tuple
       (bucket_name, bucket_region) if a valid domain name, else `None`
  
       >>> parse_bucket_info('www.riotgames.com.br.s3-website-us-west-2.amazonaws.com')
      ('www.riotgames.com.br', 'us-west-2')
  
      Args:
          domain (`str`): Domain name to parse
  
      Returns:
          :obj:`list` of `str`: `str`,`None`