Giter VIP home page Giter VIP logo

Comments (6)

mhart avatar mhart commented on September 26, 2024 1

I guess there's a chance that the config settings in checkBucketAccess are somehow messing with the global S3 config settings?

See if this works (it would actually be cleaner this way):

async function checkBucketAccess({ bucket = CMDA_BUCKET }) {
  if (!bucket) throw new Error('bucket cannot be empty')
  const s3 = new S3({ maxRetries: 0, httpOptions: { timeout: 2000, connectTimeout: 2000 } })
  await s3.headBucket({ Bucket: bucket }).promise()
}

from cmda.

se-achiu avatar se-achiu commented on September 26, 2024

Updating the lambda function code for S3 timeout to 5 minutes will fixed the issue
async function checkBucketAccess({ bucket = CMDA_BUCKET }) { if (!bucket) throw new Error('bucket cannot be empty') const s3 = new S3() s3.config.maxRetries = 0 const httpOptions = s3.config.httpOptions || {} httpOptions.timeout = 300000 httpOptions.connectTimeout = 300000 await s3.headBucket({ Bucket: bucket }).promise() }

from cmda.

mhart avatar mhart commented on September 26, 2024

But checkBucketAccess isn't involved in the upload – it's only there to ensure the lambda function has access to the bucket. You sure it's to do with the size of the file (50MB isn't very big)?

How slow is the internet connection you're on?

from cmda.

mhart avatar mhart commented on September 26, 2024

If the timeout on checkBucketAccess is changed to be 5 minutes, and lambda can't access to the bucket, then it will take 5 minutes before that feedback can be given to the user

from cmda.

se-achiu avatar se-achiu commented on September 26, 2024

I thought as well that the checkBucketAccess wasn't the cause, but after I update the lambda function with the 5 minutes, I was able to upload 512mb of data, where previously was failing consistently.

from cmda.

mhart avatar mhart commented on September 26, 2024

Fixed (hopefully) in v1.2.0

from cmda.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.