Skip to content

Commit e1664c1

Browse files
ivanmp91rzvoncek
authored andcommitted
Add support for s3 canned ACLs for uploaded objects
1 parent 6a56e53 commit e1664c1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

docs/aws_s3_setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Create an IAM Policy called `MedusaStorageStrategy`, with the following definiti
5151
"s3:GetReplicationConfiguration",
5252
"s3:ListMultipartUploadParts",
5353
"s3:PutObject",
54+
"s3:PutObjectAcl",
5455
"s3:GetObject",
5556
"s3:GetObjectTorrent",
5657
"s3:PutObjectRetention",

medusa-example.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ use_sudo_for_restore = True
133133
; Read timeout in seconds for the storage provider.
134134
;read_timeout = 60
135135

136+
; Canned ACL for uploaded objects on S3. Defaults to private
137+
canned_acl = private
138+
136139
[monitoring]
137140
;monitoring_provider = <Provider used for sending metrics. Currently either of "ffwd" or "local">
138141

medusa/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
['bucket_name', 'key_file', 'prefix', 'fqdn', 'host_file_separator', 'storage_provider', 'storage_class',
3232
'base_path', 'max_backup_age', 'max_backup_count', 'api_profile', 'transfer_max_bandwidth',
3333
'concurrent_transfers', 'multi_part_upload_threshold', 'host', 'region', 'port', 'secure', 'ssl_verify',
34-
'aws_cli_path', 'kms_id', 'backup_grace_period_in_days', 'use_sudo_for_restore', 'k8s_mode', 'read_timeout']
34+
'aws_cli_path', 'kms_id', 'backup_grace_period_in_days', 'use_sudo_for_restore', 'k8s_mode', 'read_timeout',
35+
'canned_acl']
3536
)
3637

3738
CassandraConfig = collections.namedtuple(
@@ -117,7 +118,8 @@ def _build_default_config():
117118
'region': 'default',
118119
'backup_grace_period_in_days': 10,
119120
'use_sudo_for_restore': 'True',
120-
'read_timeout': 60
121+
'read_timeout': 60,
122+
'canned_acl': 'private',
121123
}
122124

123125
config['logging'] = {

0 commit comments

Comments
 (0)