S3 encrypted files corrupted randomly

0

Hello,

so i am new to aws and wanted to store files uploaded from my website to aws. the files that are being uploaded are sensitive and encrypted with a third party tool. everything works fine but randomly the files uploaded become corrupted and im not sure why. if i upload directly from aws console the file is fine. and even if i upload the same file again it might not be corrupted. i would appreciate any help.

my website is hosted on webflow, i am using make.com to take the file and upload it to aws.

Amer
asked 2 months ago175 views
1 Answer
0

Hi, I wouldn't be able to comment on your third-party tool without much information regarding it. However, I would recommend looking at using native S3 client-side encryption. You can encrypt and decrypt at client-side using Amazon S3 Encryption Client, and coding in your preferred language.

https://docs.aws.amazon.com/amazon-s3-encryption-client/latest/developerguide/how-it-works.html#how-it-works-walkthrough

If above is not possible, I would recommend calculating checksum for your objects and provide that checksum algorithm and precalculated value before the upload. When S3 receives the object, it calculates the checksum by using the algorithm that you specified. If the two checksum values don't match, Amazon S3 generates an error. This way, you could possibly avoid file corruption issues ensuring integrity through checksum.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html

https://aws.amazon.com/getting-started/hands-on/amazon-s3-with-additional-checksums/?ref=docs_gateway/amazons3/checking-object-integrity.html

You may also use the following method adding Content-MD5 value as request header when uploading to S3.

https://repost.aws/knowledge-center/data-integrity-s3

psp
answered a month ago
AWS
EXPERT
reviewed a month ago
  • Hello, thank you for your reply. the files i have are binary files which are being edited and saved as .bin but the third-party tool is a mix of hardware and software that encrypts the file and then saves it with other extensions to make it useable by also the companies software. I am not that good at coding to use S3 client-side encryption. As for the second option you suggested, I have the SHA-1 but how can i have S3 calculate the checksum using it? also you mentionned that if the checksum keys don't match S3 will generate an error. i need to make sure the file is uploaded from the first time and not becomming corrupted as this is a SAAS project and sending corrupted files is bad.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions