def get_bucket_config(config, bucket_name):
    """
        Pulls correct bucket config from application config based on name/alias.

        Args:
            config(dict)
            bucket_name(string): bucket name or bucket reference name

        Returns:
            dict | None: config for bucket or None if not found
    """
    bucket_config = None

    for bucket in config["buckets"]:
        if bucket_name == bucket["referenceName"]:
            bucket_config = bucket

    return bucket_config