Я новичок в AWS и Boto3, и я пытаюсь загрузить свой файл json в s3. Я назначил роль sAMFullAccess IAM для моего ec2. У меня установлены python3 .5 и boto3. Я пытаюсь ниже код.
from boto3.s3.transfer import S3Transfer
import boto3
s3_client = boto3.resource('s3')
transfer = S3Transfer(s3_client)
bucket_name='test-bucket-oracle'
prefix='configurations'
transfer.upload_file('/home/ec2-user/temp/config.json', bucket_name, prefix+'configs3.json', ExtraArgs={'ServerSideEncryption': "AES256"})
и получаю ошибку ниже. Любая помощь высоко ценится.
Traceback (most recent call last):
File "transfers3.py", line 4, in <module>
transfer = S3Transfer(s3_client)
File "/home/ec2-user/.local/lib/python3.5/site-packages/boto3/s3/transfer.py", line 259, in __init__
self._manager = create_transfer_manager(client, config, osutil)
File "/home/ec2-user/.local/lib/python3.5/site-packages/boto3/s3/transfer.py", line 160, in create_transfer_manager
return TransferManager(client, config, osutil, executor_cls)
File "/home/ec2-user/.local/lib/python3.5/site-packages/s3transfer/manager.py", line 264, in __init__
self._register_handlers()
File "/home/ec2-user/.local/lib/python3.5/site-packages/s3transfer/manager.py", line 514, in _register_handlers
self._client.meta.events.register_first(
AttributeError: 'ResourceMeta' object has no attribute 'events'