Skip to content

Commit

Permalink
Support CognitoIdentityCredentials
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Oct 20, 2023
1 parent c03e9ee commit 4d9a9b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import AWS from "aws-sdk";

new AWS.CognitoIdentityCredentials();
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { fromCognitoIdentity } 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
fromCognitoIdentity();
1 change: 1 addition & 0 deletions src/transforms/v2-to-v3/config/AWS_CREDENTIALS_MAP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
export const AWS_CREDENTIALS_MAP: Record<string, string> = {
ChainableTemporaryCredentials: "fromTemporaryCredentials",
CognitoIdentityCredentials: "fromCognitoIdentity",
EC2MetadataCredentials: "fromInstanceMetadata",
ECSCredentials: "fromContainerMetadata",
EnvironmentCredentials: "fromEnv",
Expand Down

0 comments on commit 4d9a9b9

Please sign in to comment.