'AWS S3 Checksum values are null or pre-existing objects
If I upload a file to S3 using the following code, I will be able to retrieve its Checksum value later if needed. Note, the variable “fileSHA256CheckSumValue” is the CheckSum value I generated from the file locally before I uploaded it. When we do this, a CheckSum value is automatically generated for the file at S3 and compared with this value. If they don’t match, it throws an exception and the file is not saved to S3.
Later, I can retrieve the file’s CheckSum value using this code:
I found that if I DON’T pass in the CheckSum value when uploading the file, I cannot retrieve it later:
In this case when I try to retrieve the CheckSum value, it returns null.
The problem is there are 1000s, maybe millions of files already in S3 that have not been uploaded with a CheckSum value passed in. How can I force a CheckSum value to be generated on these files?
I have googled this a lot and not found any posts or documentation regarding this.
Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



