diff --git a/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.input.js b/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.input.js new file mode 100644 index 000000000..ec9ca5d00 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.input.js @@ -0,0 +1,8 @@ +import AWS from "aws-sdk"; + +const s3 = new AWS.S3(); +const params = { Bucket: "bucket", Fields: { key: "key" } }; + +s3.createPresignedPost(params, function (err, data) { + console.log('The URL is', data.url); +}); \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.output.js b/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.output.js new file mode 100644 index 000000000..4583fdf98 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/s3-presigned-post/callback.output.js @@ -0,0 +1,10 @@ +import AWS from "aws-sdk"; + +const s3 = new AWS.S3(); +const params = { Bucket: "bucket", Fields: { key: "key" } }; + +// S3 createPresignedPost with callbacks is not supported in AWS SDK for JavaScript (v3). +// Please convert to 'client.createPresignedPost(params)', and re-run aws-sdk-js-codemod. +s3.createPresignedPost(params, function (err, data) { + console.log('The URL is', data.url); +}); \ No newline at end of file