File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
packages/credential-providers Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -505,7 +505,8 @@ See [`fromSSO()`](#fromsso) fro more information
505505
506506## ` fromEnv() `
507507
508- - Not available in browser & native apps
508+ - Not available in browser & native apps unless your code or bundler populates the
509+ ` process.env ` global object.
509510
510511``` javascript
511512import { fromEnv } from " @aws-sdk/credential-providers" ; // ES6 import
Original file line number Diff line number Diff line change @@ -24,5 +24,8 @@ import { AwsCredentialIdentityProvider } from "@smithy/types";
2424 * credentials: fromEnv(),
2525 * });
2626 * ```
27+ *
28+ * To use this in non-Node.js environments such as a browser, your code or
29+ * build system must populate the `process.env` global object.
2730 */
2831export const fromEnv = ( init ?: FromEnvInit ) : AwsCredentialIdentityProvider => _fromEnv ( init ) ;
Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ export * from "./fromCognitoIdentity";
22export * from "./fromCognitoIdentityPool" ;
33export { fromHttp } from "@aws-sdk/credential-provider-http" ;
44export type { FromHttpOptions , HttpProviderCredentials } from "@aws-sdk/credential-provider-http" ;
5+ export * from "./fromEnv" ;
56export * from "./fromTemporaryCredentials" ;
67export * from "./fromWebToken" ;
You can’t perform that action at this time.
0 commit comments