Using AWS S3 getSignedUrl

Hi there.

I’m building an app where i need to restrict the acces of the images for a limited duration. I’m trying to implement the AWS S3 getSignedUrl, but i’m getting an error saying it’s not a function.
This is my code:

exports = async function(bucket, filename, expirySeconds){
  
   const s3 = context.services.get('MyAWSService').s3("eu-central-1");
   
  return s3.getSignedUrl('getObject',
   {
     "Bucket" : bucket,
     "Filename": filename,
     "ContentType": "image/jpeg",
     "Expires": expirySeconds
   }, function(err, url) {
     console.log(`Yes - did reach function!`);
  });
  
};

Could someone help me a bit with this snippet, or point to some mongodb resources with a guide to this?

Thanks in advance