i want to write a script that will be called by incron to upload files to the S3 bucket in the "other region" when the data files are moved. In detail: when a file is uploaded via FTP to an FTP server in the Ireland region, the file will move , causing an inotify event. Incron should handle this event and kick off a script that will upload this file to the S3 bucket in the us-east-1 bucket. Upload this file to the bucket using the accelerated endpoint and using multipart uploads...
i wrote this much code for this..but i dont have any idea about incron and script is also not completed ... plz guide me through this.
i am posting screenshot of my code in attachment..and here too

i wrote this much code for this..but i dont have any idea about incron and script is also not completed ... plz guide me through this.
i am posting screenshot of my code in attachment..and here too
import os, sys import boto3 client = boto3.client('s3') def accelarationBucket(): response = client.put_bucket_accelerate_configuration( Bucket=' mybucketname', AccelerateConfiguration={'Status': 'Enabled'} ) def creatMultipartUpload(): response = client.create_multipart_upload( Bucket='twc-ecmwf-data-eu-west-1', key='first' ) response = client.complete_multipart_upload( Bucket='twc-ecmwf-data-eu-west-1', Key='first', UploadId='' ) def rsyncBucket(): boto-rsync s3://twc-ecmwf-data-eu-west-1 s3://twc-ecmwf-data-us-east-1 accelarationBucket() creatMultipartUpload() rsyncBucket()
