I need lambda function to send the image from S3 to multiple Raspberry pi devices. Whenever there is new version of the picture uploaded in s3, it should trigger the function. and send the uploaded images to Rpi
Asked
Active
Viewed 303 times
1 Answers
0
There are two ways to achieve it after setting Lambda on S3 trigger:
- Download the file using aws sdk in the /tmp/ folder. Lambda allows 512 MB storage.
- Use paramiko to transfer file/s to any number of Raspberry Pi servers.
OR
- Create S3 presigned URL/s in Lambda function for the specified S3 file/s.
- Run a remote wget command on RaspBerry Pi's with presigned URL as input.
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.

amsh
- 3,097
- 2
- 12
- 26