skip to Main Content

AWS S3 GET pre-signed url fails with CORS intermittently

I'm generating a pre-signed url using java for an image stored in s3 public String generateDownloadLink(String bucketName, String responseContentDisposition, String key, int days) { GetObjectRequest objectRequest = GetObjectRequest.builder() .bucket(bucketName) .responseContentDisposition(responseContentDisposition) .key(key).build(); GetObjectPresignRequest preSignRequest = GetObjectPresignRequest.builder() .signatureDuration(Duration.ofDays(days)) .getObjectRequest(objectRequest) .build(); PresignedGetObjectRequest presignedRequest…

VIEW QUESTION

Existing solutions not working- (AWS Lambda Api) The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true'

my lambda function module.exports.handler = async(event, context, callback) => { return { statusCode: 200, headers: { "Access-Control-Allow-Credentials" : 'true', 'Access-Control-Allow-Origin': 'mydomain_name', 'Access-Control-Allow-Methods':'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT', 'Access-Control-Allow-Headers':'content-type,authorization', }, body: JSON.stringify({ message: `Charge processed succesfully!`, success:true, }), } } error -" The value of the…

VIEW QUESTION
Back To Top
Search