简体   繁体   English

是否可以使用带有 S3 触发器的 lambda 函数将数据从 S3 发送到 Raspberry pi

[英]Is it possible to send data from S3 to Raspberry pi using lambda function with S3 trigger

I need lambda function to send the image from S3 to multiple Raspberry pi devices.我需要 lambda 函数将图像从 S3 发送到多个 Raspberry pi 设备。 Whenever there is new version of the picture uploaded in s3, it should trigger the function.每当s3上传的图片有新版本时,它应该触发该功能。 and send the uploaded images to Rpi并将上传的图像发送到 Rpi

There are two ways to achieve it after setting Lambda on S3 trigger:在 S3 触发器上设置 Lambda 后,有两种方法可以实现:

  • Download the file using aws sdk in the /tmp/ folder.使用 aws sdk 在 /tmp/ 文件夹中下载文件。 Lambda allows 512 MB storage. Lambda 允许 512 MB 存储。
  • Use paramiko to transfer file/s to any number of Raspberry Pi servers.使用paramiko将文件传输到任意数量的 Raspberry Pi 服务器。

OR或者

wget <presigned_url> -O /path/to/folder/

These solutions are based on python to give you an idea, yet you may find paramiko and remote script alternative libraries in other languages as well.这些解决方案基于 python 给你一个想法,但你也可以找到其他语言的 paramiko 和远程脚本替代库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM