Thanks for sharing this!! I am having an issue running it though. I am getting the following error (I also put a redacted version of my config below as well):
/home/ubuntu/.local/lib/python3.8/site-packages/s3_sftp_sync/cli.py:36: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(file)
Starting sync
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/s3_sftp_sync", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/s3_sftp_sync/cli.py", line 117, in main
response = s3.get_object(Bucket=bucket, Key=key)
File "/home/ubuntu/.local/lib/python3.8/site-packages/botocore/client.py", line 386, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/botocore/client.py", line 677, in _make_api_call
request_dict = self._convert_to_request_dict(
File "/home/ubuntu/.local/lib/python3.8/site-packages/botocore/client.py", line 725, in _convert_to_request_dict
request_dict = self._serializer.serialize_to_request(
File "/home/ubuntu/.local/lib/python3.8/site-packages/botocore/validate.py", line 319, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter Key, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
sftp:
hostname: sftp.sitetouse.io
username: username
password: password
verify_host_key: true
s3:
bucket: syncbucket1
key_prefix: /sitetouse
aws_access_key_id: accesskey
aws_secret_access_key: secretkey
# remove this section to use full sync
# incremental_sync:
# last_modified_s3_key: sftp-sync-last-modified ## Key used for incremental sync