Relative Content

Tag Archive for amazon-web-servicesamazon-s3aws-lambda

S3 CopyObjectCommand transient failures on lambda

I’m writing a lambda to copy files from a source s3 bucket to a destination bucket in the same account, and then delete the file from the original bucket. The lambda functions normally for most files, but occasionally will repeatedly fail to copy a file over, even though the original file will always get deleted. I notice that when a file fails to copy over, uploading it and running the lambda again will cause it to consistently fail to copy, but other files with the same file type and extension will copy successfully, including files of a larger or smaller size. The lambda will not throw or log any error, but if I check the destination s3 bucket then I’ll see that no object has been copied. The destination object key is a UUID generated within the lambda and I’m confident there’s nothing else interacting with files in the destination bucket. The files I’m testing are also relatively small (<100 KB). The relevant code looks like this:

S3 CopyObjectCommand transient failures on lambda

I’m writing a lambda to copy files from a source s3 bucket to a destination bucket in the same account, and then delete the file from the original bucket. The lambda functions normally for most files, but occasionally will repeatedly fail to copy a file over, even though the original file will always get deleted. I notice that when a file fails to copy over, uploading it and running the lambda again will cause it to consistently fail to copy, but other files with the same file type and extension will copy successfully, including files of a larger or smaller size. The lambda will not throw or log any error, but if I check the destination s3 bucket then I’ll see that no object has been copied. The destination object key is a UUID generated within the lambda and I’m confident there’s nothing else interacting with files in the destination bucket. The files I’m testing are also relatively small (<100 KB). The relevant code looks like this:

How to add URL shortener in the photo sharing app in AWS architecture

I’m developing a serverless architecture on AWS for a photo-sharing app. The app will receive photos from computers and mobile devices, store the original images, generate various sized versions of these photos, store the resized photos, and finally create short links for all images to facilitate downloading and sharing.