Trigger an AWS lambda function with an ftp/ sftp event

0

Is there a way to trigger an AWS Lambda function right after uploading a file to an SFTP/FTP server without having to explicitly check for new updates? Now, I'm using cloud watch to trigger the function every 5 minutes to check if the file was updated or not but I would like to know if there is a more optimized method to do so.

質問済み 2年前3881ビュー
2回答
0

If the FTP server is your own server, no. It is up to you to create the mechanism.

If your FTP server writes the files to S3, you can create notifications from S3 that will launch Lambda functions.

In AWS we do have a service called AWS Transfer for FTP that uses the FTP protocol to upload files to S3, so that you can then invoke functions directly.

profile pictureAWS
エキスパート
Uri
回答済み 2年前
0

With custom, you may have to use your own implementation logic. Alternatively you can use AWS Transfer Family which is a secure transfer service that enables you to transfer files into and out of AWS storage services.

AWS Transfer Family supports transferring data from or to the following AWS storage services.

  1. Amazon Simple Storage Service (Amazon S3) storage.
  2. Amazon Elastic File System (Amazon EFS) Network File System (NFS) file systems.

AWS Transfer Family supports transferring data over the following protocols:

  • Secure Shell (SSH) File Transfer Protocol (SFTP): version 3
  • File Transfer Protocol Secure (FTPS)
  • File Transfer Protocol (FTP)
  • Applicability Statement 2 (AS2)

You can also use custom file-processing step, you can Bring Your Own file-processing logic using AWS Lambda. Upon file arrival, a Transfer Family server invokes a Lambda function that contains custom file-processing logic, such as encrypting files, scanning for malware, or checking for incorrect file types

References

  1. https://docs.aws.amazon.com/transfer/latest/userguide/what-is-aws-transfer-family.html
  2. https://docs.aws.amazon.com/transfer/latest/userguide/custom-step-details.html
profile pictureAWS
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ