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

101
Views
S3GetSignedUrl not accepting an expiry time

I'm currently using a lambda to created signed links for my s3 bucket, and these links are supposed to have an expiry time of 24 hours. However, when I check the returned link - all the expiry times are set to 15 minutes. I've changed the CORS configuration on the s3 server to 86400 (24 hours), but that hasn't seemed to have fixed it. The file retrieval works perfectly fine though.

I'm using the javascript s3 sdk for doing this, below is the piece of code that creates the signed url. What can I do to make it accept the expires time?

var EXPIRY_IN_SECONDS = 3600 * 24; // 24 hour

function createSignedDownloadUrl(options, callback) {

  if (!options || !options.fileName ) {
    return callback(new Error('Invalid input.'));
  }

  var containsSpecialChars = /[^\u0000-\u00ff]/g.test(options.fileName);
  var contentDisposition;
  if (containsSpecialChars) {
    contentDisposition = 'inline; filename*=UTF-8\'\''+ encodeURIComponent(options.fileName);
  } else {
    contentDisposition = 'inline; filename="'+ options.fileName + '"; filename*=UTF-8\'\''+ encodeURIComponent(options.fileName);
  }
  var getObjectParams = {
    Bucket: options.s3Bucket,
    Key: options.s3Key,
    Expires: EXPIRY_IN_SECONDS,
    ResponseContentDisposition: contentDisposition,
  };

  s3.getSignedUrl('getObject', getObjectParams, callback);
}
about 4 years ago · Santiago Trujillo
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!