Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
AWS S3 uploading not working

I'm using the following to upload images to S3. Weirdly, it doesn't even enter the Block. So, no error, no success indication...it simply doesn't return anything at all. I haven't seen this happened before.

    AWSS3TransferManagerUploadRequest *amazonUploadRequest = [AWSS3TransferManagerUploadRequest new];
    amazonUploadRequest.bucket = AWS_PICTURE_BUCKET;
    amazonUploadRequest.body = fileUrl;
    amazonUploadRequest.key = key;
    amazonUploadRequest.contentType = @"image/jpeg";

    AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager];
    [[transferManager upload:amazonUploadRequest] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) {
//Never reaches here.
        if (task.error == nil) {
            completionBlock();
        } else {
            errorBlock(task.error);
        }
        return nil;
    }];

Anyone seen this issue ever? I have used this in the past to upload 1 or 2 images or even 50 images in loop. I am trying right now with 100 right now and it doesn't even execute once.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Found it!

So I was using dispatch_semaphore_t asynchronously for each upload and it turns out GCD has a 64 thread limit and I was hitting that with 100 + uploads. This was making all the uploads wait (DISPATCH_TIME_FOREVER) and hence it seemed like AWS method wasn't responding.

I fixed it by adjusting dispatch_semaphore_t and getting rid of my asynchronous block for individual upload. If you find yourself in this situation, hit the pause button and look for the number of threads running at a time.

Thanks!

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!