Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

108
Vistas
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);
}
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda