add warning about not copying acl rules

This commit is contained in:
Jakub Sokołowski 2018-08-30 14:59:18 -04:00
parent 8f7f8256d8
commit fa26f6e989
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 0 deletions

View File

@ -21,5 +21,6 @@ for f in s3.list_objects_v2(Bucket=BUCKET)['Contents']:
dots = name.count('.')
new_name = name.replace('.', '-', dots-1)
print('{:<30} -> {}'.format(name, new_name))
# WARNING: This does not copy ACL rules!
s3.copy({'Bucket': BUCKET, 'Key': name}, BUCKET, new_name)
s3.delete_object(Bucket=BUCKET, Key=name)