You will be struggling with EBS throughput.
Smaller m5 / m5a /m6g instances have up to 4,750 Mbps EBS throughput = ca 600 MB/s max. Larger instances like m5.24xlarge can go up to 19,000 Mbps or 2.4 GB/s. But only if your EBS volume can handle it, ie it will probably have to be IOPS-optimised volume (io1 type) to sustain this throughput.
That means your 25TB of data (1000 files x 25 GB each) can be read from the EBS in somewhere between 3 hours and 12 hours in ideal conditions. In reality it will probably be slower. And that's just reading the files.
The CPU doesn't really matter - any CPU can do sha256 at this speed so use a cheaper architecture like M6g (ARM based) and if it comes with multiple cores (e.g. m6g.xlarge
with 4 CPU cores) you can hash 4 files in parallel. Though that may not reduce the time 4x as you would expect because of the EBS throughput bottleneck.
I would buy m6g.4xlarge
as a Spot Instance and expect it will take a day to hash the files. If your EBS is in a region where M6g (ARM) is not available use M5a (AMD) - it's cheaper than the M5 (Intel) and still powerful enough for the hashing.
Hope that helps :)