-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comment about credentials transformation
- Loading branch information
Showing
11 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/transforms/v2-to-v3/__fixtures__/credentials/chainable.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
new AWS.ChainableTemporaryCredentials({ | ||
params: { RoleArn: "RoleA" }, | ||
masterCredentials: existingCredentials, | ||
}); |
9 changes: 9 additions & 0 deletions
9
src/transforms/v2-to-v3/__fixtures__/credentials/chainable.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { fromTemporaryCredentials } from "@aws-sdk/credential-providers"; | ||
|
||
// JS SDK v3 switched to credential providers to functions instead of objects. | ||
// This is the closest approximation from codemod of what your application needs. | ||
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers | ||
fromTemporaryCredentials({ | ||
params: { RoleArn: "RoleA" }, | ||
masterCredentials: existingCredentials, | ||
}); |
2 changes: 1 addition & 1 deletion
2
src/transforms/v2-to-v3/__fixtures__/credentials/ec2-metadata.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
const credentials = new AWS.EC2MetadataCredentials(); | ||
new AWS.EC2MetadataCredentials(); |
5 changes: 4 additions & 1 deletion
5
src/transforms/v2-to-v3/__fixtures__/credentials/ec2-metadata.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { fromInstanceMetadata } from "@aws-sdk/credential-providers"; | ||
|
||
const credentials = fromInstanceMetadata(); | ||
// JS SDK v3 switched to credential providers to functions instead of objects. | ||
// This is the closest approximation from codemod of what your application needs. | ||
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers | ||
fromInstanceMetadata(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
const credentials = new AWS.ECSCredentials(); | ||
new AWS.ECSCredentials(); |
5 changes: 4 additions & 1 deletion
5
src/transforms/v2-to-v3/__fixtures__/credentials/ecs.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { fromContainerMetadata } from "@aws-sdk/credential-providers"; | ||
|
||
const credentials = fromContainerMetadata(); | ||
// JS SDK v3 switched to credential providers to functions instead of objects. | ||
// This is the closest approximation from codemod of what your application needs. | ||
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers | ||
fromContainerMetadata(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import AWS from "aws-sdk"; | ||
|
||
const credentials = new AWS.EnvironmentCredentials("AWS"); | ||
new AWS.EnvironmentCredentials("AWS"); |
5 changes: 4 additions & 1 deletion
5
src/transforms/v2-to-v3/__fixtures__/credentials/env.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { fromEnv } from "@aws-sdk/credential-providers"; | ||
|
||
const credentials = fromEnv("AWS"); | ||
// JS SDK v3 switched to credential providers to functions instead of objects. | ||
// This is the closest approximation from codemod of what your application needs. | ||
// Reference: https://www.npmjs.com/package/@aws-sdk/credential-providers | ||
fromEnv("AWS"); |
6 changes: 0 additions & 6 deletions
6
src/transforms/v2-to-v3/__fixtures__/credentials/temp.input.js
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/transforms/v2-to-v3/__fixtures__/credentials/temp.output.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters