Unable to perform cloudfront url signing using aws sdk

When calling AWS.CloudFront.Signer.getSignedUrl I get the error: ‘crypto’ module: error creating sign. After some investigation it seems that the signer is using crypto to create a sign named: ‘RSA-SHA1’ which fails on realm function. I moved my code to an AWS lambda function and it works. I am using the latest aws-sdk dependency.