-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't workingp2This is a standard priority issueThis is a standard priority issue
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
Running transform containing a Cloudfront Signer does not transform, but only remove the legacy import
Steps to reproduce
import { CloudFront } from "aws-sdk";
//....
export async function cloudfrontSignUrl(url, expires_at_ms, options = {}) {
// ...
let signer = new CloudFront.Signer(accessKeyID, privateKeyContents);
return signer.getSignedUrl({ url, expires: expires_at_ms, ...options });
}
Observed behavior
- Removes
import { CloudFront } from "aws-sdk";
Expected behavior
Should result in
import { getSignedUrl } from "@aws-sdk/cloudfront-signer";
// ...
export async function cloudfrontSignUrl(url, expires_at_ms, options = {}) {
// ...
return getSignedUrl({ url, privateKey: privateKeyContents, keyPairId: accessKeyID, dateLessThan: expires_at_ms})
}
Environment
aws-sdk-js-codemod: 0.28.2
- jscodeshift: 0.15.0
- recast: 0.23.4
Additional context
No response
sehediy and iliagua
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp2This is a standard priority issueThis is a standard priority issue