Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cloudfront Signer is not replaced #736

Open
1 task
darioackermann opened this issue Nov 18, 2023 · 0 comments
Open
1 task

[Bug]: Cloudfront Signer is not replaced #736

darioackermann opened this issue Nov 18, 2023 · 0 comments
Labels
bug Something isn't working p2 This is a standard priority issue

Comments

@darioackermann
Copy link

darioackermann commented Nov 18, 2023

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

@darioackermann darioackermann added bug Something isn't working triage Triaging bugs labels Nov 18, 2023
@trivikr trivikr added p2 This is a standard priority issue and removed triage Triaging bugs labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants