diff --git a/physionet-django/project/cloud/s3.py b/physionet-django/project/cloud/s3.py index 215461ce2..ff85640fb 100644 --- a/physionet-django/project/cloud/s3.py +++ b/physionet-django/project/cloud/s3.py @@ -1201,7 +1201,7 @@ def upload_project_to_S3(project): bucket_created = False # Set the bucket policy only if the bucket was newly created and has controlled access - if bucket_created and project.access_policy == AccessPolicy.CONTROLLED: + if bucket_created and project.access_policy == AccessPolicy.CREDENTIALED: controlled_policy = create_controlled_bucket_policy(bucket_name) s3.put_bucket_policy(Bucket=bucket_name, Policy=controlled_policy) diff --git a/physionet-django/project/test_s3.py b/physionet-django/project/test_s3.py index 572bf6898..7581b5986 100644 --- a/physionet-django/project/test_s3.py +++ b/physionet-django/project/test_s3.py @@ -22,6 +22,7 @@ AWS_ACCOUNT_ID='123456789012', S3_OPEN_ACCESS_BUCKET='datashare-public', S3_SERVER_ACCESS_LOG_BUCKET='datashare-logs', + S3_CONTROLLED_ACCESS_BUCKET='datashare-protected', ) class TestS3(TestMixin): """