I'm trying to run a Node.js script on AWS Lambda to upload images to a third-party API, and I need some guidance on how to store these images. I have 365 .png images, each sized between 10 to 80 KB. My goal is to have the Lambda function randomly select one of these images each time it runs, which will be about once a day. I'm considering options like S3 or DynamoDB for storage, but I'm not sure which would be the best fit. Also, since I have limited data, is there any way to make this cost-effective or possibly free? This is my first time diving into AWS, so I appreciate any advice you can share!
1 Answer
Using S3 is definitely the way to go. You can upload all your images there and set up your Lambda to have the necessary permissions to read from your S3 bucket. It’ll make it easy for you to randomly pick an image and send it to the API.
Thanks for the response! I checked S3's pricing, and it looks like it's about $0.025 per GB. Since my images are so small, will I really be spending much? It seems like my total would be less than a cent per year!