Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

104
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda