diff --git a/sdk/python/kubeflow/storage_init_container/s3.py b/sdk/python/kubeflow/storage_init_container/s3.py index cd7548d7cb..dd69f08e6c 100644 --- a/sdk/python/kubeflow/storage_init_container/s3.py +++ b/sdk/python/kubeflow/storage_init_container/s3.py @@ -25,6 +25,12 @@ def is_valid_url(self, url): def __post_init__(self): # Custom checks or validations can be added here + if ( + self.bucket_name is None + or self.endpoint_url is None + or self.file_key is None + ): + raise ValueError("bucket_name or endpoint_url or file_key is None") self.is_valid_url(self.endpoint_url) @@ -39,7 +45,7 @@ def download_dataset(self): aws_access_key_id=self.config.access_key, aws_secret_access_key=self.config.secret_key, endpoint_url=self.config.endpoint_url, - region_name=self.config.egion_name, + region_name=self.config.region_name, ) # Download the file