I'm using the AmazonS3Client.PutObjectAsync(PutObjectAsync, CancellationToken) method to upload my files to s3 storage.
so the code inside my service looks like
await _client.PutObjectAsync(putObject, cancellationToken).ConfigureAwait(false);
I have to wait until the upload completes because the next service should download these files.
Now, I'm facing the problem - PutObjectAsync is executed, but s3 doesn't contain the file I need, it appears only after a few seconds after my program is finished.
I checked the PutObjectResponse class but didn't find anything which can explain if a file was completely uploaded. I also didn't find info about PutObjectAsync method behavior.
So the question is if PutObjectAsync combined with ConfigurateAwait(false) really waits for upload completion or am I missing something?
Thank you in advance. Any guidance would be appreciated.