Skip to content
This repository was archived by the owner on Nov 11, 2023. It is now read-only.

Trade requests files are generated from d1g1t every hour until 2pm, and then every 30 minutes, 10 minutes and 5 minutes leading up to 4pm. This will generate multiple files into the FTP folder from d1g1t to Q Wealth. These files need to be uploaded into another FTP folder from Q Wealth to NBIN.

License

Notifications You must be signed in to change notification settings

thomaskosciuch/DigitSftpTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigitSftpTransfer

Trade requests files are generated from d1g1t every hour until 2pm, and then every 30 minutes, 10 minutes and 5 minutes leading up to 4pm. This will check which files in the source (d1g1t) are newer than or don't exist in the destination (NBIN) and transfer them.

Any uploaded files will be opened and the quantity of rows, which correspond to transactions are counted and digested in an email.

If no files are uploaded, then no files are transfered. No emails are sent.

If for any reason we encounter a failure, an email is sent to the distribution list and recorded in our error reporting software.

How it works

We executing a cron-job using eventbridge that triggers a lambda function and moves files from A to B using ssh file transfer protocols (SFTP). It will record all transfer-files in a dynamo db.

SFTP

The lambda is using pysftp to create a connection, then I use the exposed the underlying paramiko client (able to conduct more advanced operations) to read, and transfer the file.

Emails

If the SFTP file transfer fails or succeeds emails are sent using SES

Issues

  • Currently we are using welcome@qwealth.com instead of a not-stupid email
  • Currently the error reporting is lacklustre

How to maintain:

Write code here. cdk deploy will use run app.py, which then builds the what exists in cdk_build/DigitFtpStack [sic]. Note that the cdk.out file contains assets each time that this is deployed, and therefore should manually be deleted every now and then.

About

Trade requests files are generated from d1g1t every hour until 2pm, and then every 30 minutes, 10 minutes and 5 minutes leading up to 4pm. This will generate multiple files into the FTP folder from d1g1t to Q Wealth. These files need to be uploaded into another FTP folder from Q Wealth to NBIN.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published