awscdk-construct-scte-scheduler 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/.jsii +4 -4
  2. package/lib/EventBridgeSchedule.js +1 -1
  3. package/lib/Lambda.js +1 -1
  4. package/lib/ScteScheduler.js +1 -1
  5. package/node_modules/@aws-sdk/client-medialive/dist-cjs/index.js +12 -18
  6. package/node_modules/@aws-sdk/client-medialive/dist-es/MediaLiveClient.js +12 -18
  7. package/node_modules/@aws-sdk/client-medialive/dist-types/MediaLiveClient.d.ts +2 -4
  8. package/node_modules/@aws-sdk/client-medialive/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
  9. package/node_modules/@aws-sdk/client-medialive/dist-types/runtimeConfig.browser.d.ts +2 -2
  10. package/node_modules/@aws-sdk/client-medialive/dist-types/runtimeConfig.d.ts +2 -2
  11. package/node_modules/@aws-sdk/client-medialive/dist-types/runtimeConfig.native.d.ts +2 -2
  12. package/node_modules/@aws-sdk/client-medialive/dist-types/ts3.4/MediaLiveClient.d.ts +6 -8
  13. package/node_modules/@aws-sdk/client-medialive/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  14. package/node_modules/@aws-sdk/client-medialive/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  15. package/node_modules/@aws-sdk/client-medialive/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
  16. package/node_modules/@aws-sdk/client-medialive/package.json +12 -12
  17. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +12 -18
  18. package/node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js +12 -18
  19. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +2 -4
  20. package/node_modules/@aws-sdk/client-sso/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
  21. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -2
  22. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +2 -2
  23. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -2
  24. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +6 -8
  25. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  26. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  27. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
  28. package/node_modules/@aws-sdk/client-sso/package.json +8 -8
  29. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +12 -18
  30. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/SSOOIDCClient.js +12 -18
  31. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +2 -4
  32. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
  33. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +2 -2
  34. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +2 -2
  35. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -2
  36. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +6 -8
  37. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  38. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  39. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
  40. package/node_modules/@aws-sdk/client-sso-oidc/package.json +10 -10
  41. package/node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js +12 -18
  42. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +17 -4
  43. package/node_modules/@aws-sdk/client-sts/dist-es/STSClient.js +12 -18
  44. package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -4
  45. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -4
  46. package/node_modules/@aws-sdk/client-sts/dist-types/auth/httpAuthSchemeProvider.d.ts +4 -4
  47. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -2
  48. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -2
  49. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -2
  50. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +6 -8
  51. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
  52. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
  53. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +5 -5
  54. package/node_modules/@aws-sdk/client-sts/package.json +10 -10
  55. package/node_modules/@aws-sdk/core/account-id-endpoint.js +6 -0
  56. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +97 -0
  57. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +43 -3
  58. package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.js +15 -0
  59. package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConstants.js +5 -0
  60. package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.js +24 -0
  61. package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/index.js +3 -0
  62. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +18 -0
  63. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +14 -2
  64. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +2 -1
  65. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +30 -0
  66. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +7 -0
  67. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -0
  68. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/index.d.ts +3 -0
  69. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +10 -0
  70. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +25 -1
  71. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +2 -1
  72. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +15 -0
  73. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +6 -0
  74. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +7 -0
  75. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +3 -0
  76. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +12 -0
  77. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +17 -0
  78. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +6 -1
  79. package/node_modules/@aws-sdk/core/package.json +16 -6
  80. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +6 -1
  81. package/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js +3 -0
  82. package/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts +4 -0
  83. package/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/fromEnv.d.ts +1 -0
  84. package/node_modules/@aws-sdk/credential-provider-env/package.json +1 -1
  85. package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
  86. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +3 -2
  87. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js +4 -2
  88. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts +1 -0
  89. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveStaticCredentials.d.ts +1 -0
  90. package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
  91. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  92. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +9 -3
  93. package/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js +6 -1
  94. package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +1 -1
  95. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts +1 -0
  96. package/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts +2 -2
  97. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts +1 -0
  98. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/getValidatedProcessCredentials.d.ts +3 -2
  99. package/node_modules/@aws-sdk/credential-provider-process/package.json +1 -1
  100. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +11 -2
  101. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +9 -2
  102. package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  103. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  104. package/node_modules/@smithy/core/package.json +3 -3
  105. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
  106. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +1 -1
  107. package/node_modules/@smithy/fetch-http-handler/package.json +1 -1
  108. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  109. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +1 -0
  110. package/node_modules/@smithy/smithy-client/dist-es/command.js +1 -0
  111. package/node_modules/@smithy/smithy-client/package.json +2 -2
  112. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  113. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  114. package/node_modules/@smithy/util-stream/package.json +2 -2
  115. package/node_modules/fast-xml-parser/CHANGELOG.md +349 -309
  116. package/node_modules/fast-xml-parser/README.md +83 -51
  117. package/node_modules/fast-xml-parser/package.json +8 -5
  118. package/node_modules/fast-xml-parser/src/fxp.d.ts +365 -71
  119. package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
  120. package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
  121. package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
  122. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
  123. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
  124. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
  125. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
  126. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
  127. package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
  128. package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
  129. package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
  130. package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
  131. package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
  132. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
  133. package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
  134. package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
  135. package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
  136. package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
  137. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
  138. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
  139. package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
  140. package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
  141. package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
  142. package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
  143. package/node_modules/fast-xml-parser/src/validator.js +2 -0
  144. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +31 -9
  145. package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
  146. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +25 -12
  147. package/package.json +7 -7
@@ -22,9 +22,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var httpAuthSchemes_exports = {};
23
23
  __export(httpAuthSchemes_exports, {
24
24
  AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
25
+ AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
25
26
  AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
26
27
  resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
27
- resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config
28
+ resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,
29
+ validateSigningProperties: () => validateSigningProperties
28
30
  });
29
31
  module.exports = __toCommonJS(httpAuthSchemes_exports);
30
32
 
@@ -74,20 +76,33 @@ var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties)
74
76
  );
75
77
  const signer = await signerFunction(authScheme);
76
78
  const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion;
79
+ const signingRegionSet = signingProperties == null ? void 0 : signingProperties.signingRegionSet;
77
80
  const signingName = signingProperties == null ? void 0 : signingProperties.signingName;
78
81
  return {
79
82
  config,
80
83
  signer,
81
84
  signingRegion,
85
+ signingRegionSet,
82
86
  signingName
83
87
  };
84
88
  }, "validateSigningProperties");
85
89
  var _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer {
86
90
  async sign(httpRequest, identity, signingProperties) {
91
+ var _a;
87
92
  if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) {
88
93
  throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
89
94
  }
90
- const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
95
+ const validatedProps = await validateSigningProperties(signingProperties);
96
+ const { config, signer } = validatedProps;
97
+ let { signingRegion, signingName } = validatedProps;
98
+ const handlerExecutionContext = signingProperties.context;
99
+ if (((_a = handlerExecutionContext == null ? void 0 : handlerExecutionContext.authSchemes) == null ? void 0 : _a.length) ?? 0 > 1) {
100
+ const [first, second] = handlerExecutionContext.authSchemes;
101
+ if ((first == null ? void 0 : first.name) === "sigv4a" && (second == null ? void 0 : second.name) === "sigv4") {
102
+ signingRegion = (second == null ? void 0 : second.signingRegion) ?? signingRegion;
103
+ signingName = (second == null ? void 0 : second.signingName) ?? signingName;
104
+ }
105
+ }
91
106
  const signedRequest = await signer.sign(httpRequest, {
92
107
  signingDate: getSkewCorrectedDate(config.systemClockOffset),
93
108
  signingRegion,
@@ -122,6 +137,29 @@ __name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer");
122
137
  var AwsSdkSigV4Signer = _AwsSdkSigV4Signer;
123
138
  var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
124
139
 
140
+ // src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts
141
+ var import_protocol_http3 = require("@smithy/protocol-http");
142
+ var _AwsSdkSigV4ASigner = class _AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
143
+ async sign(httpRequest, identity, signingProperties) {
144
+ var _a;
145
+ if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {
146
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
147
+ }
148
+ const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(
149
+ signingProperties
150
+ );
151
+ const multiRegionOverride = ((_a = signingRegionSet == null ? void 0 : signingRegionSet.join) == null ? void 0 : _a.call(signingRegionSet, ",")) ?? signingRegion;
152
+ const signedRequest = await signer.sign(httpRequest, {
153
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
154
+ signingRegion: multiRegionOverride,
155
+ signingService: signingName
156
+ });
157
+ return signedRequest;
158
+ }
159
+ };
160
+ __name(_AwsSdkSigV4ASigner, "AwsSdkSigV4ASigner");
161
+ var AwsSdkSigV4ASigner = _AwsSdkSigV4ASigner;
162
+
125
163
  // src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts
126
164
  var import_core = require("@smithy/core");
127
165
  var import_signature_v4 = require("@smithy/signature-v4");
@@ -220,7 +258,9 @@ var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
220
258
  // Annotate the CommonJS export names for ESM import in node:
221
259
  0 && (module.exports = {
222
260
  AWSSDKSigV4Signer,
261
+ AwsSdkSigV4ASigner,
223
262
  AwsSdkSigV4Signer,
224
263
  resolveAWSSDKSigV4Config,
225
- resolveAwsSdkSigV4Config
264
+ resolveAwsSdkSigV4Config,
265
+ validateSigningProperties
226
266
  });
@@ -0,0 +1,15 @@
1
+ import { normalizeProvider } from "@smithy/util-middleware";
2
+ import { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
3
+ export const resolveAccountIdEndpointModeConfig = (input) => {
4
+ return {
5
+ ...input,
6
+ accountIdEndpointMode: async () => {
7
+ const accountIdEndpointModeProvider = normalizeProvider(input.accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);
8
+ const accIdMode = await accountIdEndpointModeProvider();
9
+ if (!validateAccountIdEndpointMode(accIdMode)) {
10
+ throw new Error(`Invalid value for accountIdEndpointMode: ${accIdMode}. Valid values are: "required", "preferred", "disabled".`);
11
+ }
12
+ return accIdMode;
13
+ },
14
+ };
15
+ };
@@ -0,0 +1,5 @@
1
+ export const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
2
+ export const ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"];
3
+ export function validateAccountIdEndpointMode(value) {
4
+ return ACCOUNT_ID_ENDPOINT_MODE_VALUES.includes(value);
5
+ }
@@ -0,0 +1,24 @@
1
+ import { DEFAULT_ACCOUNT_ID_ENDPOINT_MODE, validateAccountIdEndpointMode, } from "./AccountIdEndpointModeConstants";
2
+ const err = "Invalid AccountIdEndpointMode value";
3
+ const _throw = (message) => {
4
+ throw new Error(message);
5
+ };
6
+ export const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
7
+ export const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
8
+ export const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS = {
9
+ environmentVariableSelector: (env) => {
10
+ const value = env[ENV_ACCOUNT_ID_ENDPOINT_MODE];
11
+ if (value && !validateAccountIdEndpointMode(value)) {
12
+ _throw(err);
13
+ }
14
+ return value;
15
+ },
16
+ configFileSelector: (profile) => {
17
+ const value = profile[CONFIG_ACCOUNT_ID_ENDPOINT_MODE];
18
+ if (value && !validateAccountIdEndpointMode(value)) {
19
+ _throw(err);
20
+ }
21
+ return value;
22
+ },
23
+ default: DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
24
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./AccountIdEndpointModeConfigResolver";
2
+ export * from "./AccountIdEndpointModeConstants";
3
+ export * from "./NodeAccountIdEndpointModeConfigOptions";
@@ -0,0 +1,18 @@
1
+ import { HttpRequest } from "@smithy/protocol-http";
2
+ import { getSkewCorrectedDate } from "../utils";
3
+ import { AwsSdkSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
4
+ export class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
5
+ async sign(httpRequest, identity, signingProperties) {
6
+ if (!HttpRequest.isInstance(httpRequest)) {
7
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
8
+ }
9
+ const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
10
+ const multiRegionOverride = signingRegionSet?.join?.(",") ?? signingRegion;
11
+ const signedRequest = await signer.sign(httpRequest, {
12
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
13
+ signingRegion: multiRegionOverride,
14
+ signingService: signingName,
15
+ });
16
+ return signedRequest;
17
+ }
18
+ }
@@ -6,18 +6,20 @@ const throwSigningPropertyError = (name, property) => {
6
6
  }
7
7
  return property;
8
8
  };
9
- const validateSigningProperties = async (signingProperties) => {
9
+ export const validateSigningProperties = async (signingProperties) => {
10
10
  const context = throwSigningPropertyError("context", signingProperties.context);
11
11
  const config = throwSigningPropertyError("config", signingProperties.config);
12
12
  const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
13
13
  const signerFunction = throwSigningPropertyError("signer", config.signer);
14
14
  const signer = await signerFunction(authScheme);
15
15
  const signingRegion = signingProperties?.signingRegion;
16
+ const signingRegionSet = signingProperties?.signingRegionSet;
16
17
  const signingName = signingProperties?.signingName;
17
18
  return {
18
19
  config,
19
20
  signer,
20
21
  signingRegion,
22
+ signingRegionSet,
21
23
  signingName,
22
24
  };
23
25
  };
@@ -26,7 +28,17 @@ export class AwsSdkSigV4Signer {
26
28
  if (!HttpRequest.isInstance(httpRequest)) {
27
29
  throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
28
30
  }
29
- const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
31
+ const validatedProps = await validateSigningProperties(signingProperties);
32
+ const { config, signer } = validatedProps;
33
+ let { signingRegion, signingName } = validatedProps;
34
+ const handlerExecutionContext = signingProperties.context;
35
+ if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
36
+ const [first, second] = handlerExecutionContext.authSchemes;
37
+ if (first?.name === "sigv4a" && second?.name === "sigv4") {
38
+ signingRegion = second?.signingRegion ?? signingRegion;
39
+ signingName = second?.signingName ?? signingName;
40
+ }
41
+ }
30
42
  const signedRequest = await signer.sign(httpRequest, {
31
43
  signingDate: getSkewCorrectedDate(config.systemClockOffset),
32
44
  signingRegion: signingRegion,
@@ -1,2 +1,3 @@
1
- export * from "./AwsSdkSigV4Signer";
1
+ export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
2
+ export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
2
3
  export * from "./resolveAwsSdkSigV4Config";
@@ -0,0 +1,30 @@
1
+ import { Provider } from "@smithy/types";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ /**
4
+ * @public
5
+ */
6
+ export interface AccountIdEndpointModeInputConfig {
7
+ /**
8
+ * The account ID endpoint mode to use.
9
+ */
10
+ accountIdEndpointMode?: AccountIdEndpointMode | Provider<AccountIdEndpointMode>;
11
+ }
12
+ /**
13
+ * @internal
14
+ */
15
+ interface PreviouslyResolved {
16
+ }
17
+ /**
18
+ * @internal
19
+ */
20
+ export interface AccountIdEndpointModeResolvedConfig {
21
+ /**
22
+ * Resolved value for input config {config.accountIdEndpointMode}
23
+ */
24
+ accountIdEndpointMode: Provider<AccountIdEndpointMode>;
25
+ }
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare const resolveAccountIdEndpointModeConfig: <T>(input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved) => T & AccountIdEndpointModeResolvedConfig;
30
+ export {};
@@ -0,0 +1,7 @@
1
+ export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
2
+ export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
3
+ export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare function validateAccountIdEndpointMode(value: any): value is AccountIdEndpointMode;
@@ -0,0 +1,14 @@
1
+ import { LoadedConfigSelectors } from "@smithy/node-config-provider";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE = "AWS_ACCOUNT_ID_ENDPOINT_MODE";
7
+ /**
8
+ * @internal
9
+ */
10
+ export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE = "account_id_endpoint_mode";
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;
@@ -0,0 +1,3 @@
1
+ export * from "./AccountIdEndpointModeConfigResolver";
2
+ export * from "./AccountIdEndpointModeConstants";
3
+ export * from "./NodeAccountIdEndpointModeConfigOptions";
@@ -0,0 +1,10 @@
1
+ import { AwsCredentialIdentity, HttpRequest as IHttpRequest } from "@smithy/types";
2
+ import { AwsSdkSigV4Signer } from "./AwsSdkSigV4Signer";
3
+ /**
4
+ * @internal
5
+ * Note: this is not a signing algorithm implementation. The sign method
6
+ * accepts the real signer as an input parameter.
7
+ */
8
+ export declare class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
9
+ sign(httpRequest: IHttpRequest, identity: AwsCredentialIdentity, signingProperties: Record<string, unknown>): Promise<IHttpRequest>;
10
+ }
@@ -1,7 +1,30 @@
1
- import { AwsCredentialIdentity, HttpRequest as IHttpRequest, HttpResponse, HttpSigner } from "@smithy/types";
1
+ import { AuthScheme, AwsCredentialIdentity, HttpRequest as IHttpRequest, HttpResponse, HttpSigner, RequestSigner } from "@smithy/types";
2
2
  /**
3
3
  * @internal
4
4
  */
5
+ interface AwsSdkSigV4Config {
6
+ systemClockOffset: number;
7
+ signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
8
+ }
9
+ /**
10
+ * @internal
11
+ */
12
+ interface AwsSdkSigV4AuthSigningProperties {
13
+ config: AwsSdkSigV4Config;
14
+ signer: RequestSigner;
15
+ signingRegion?: string;
16
+ signingRegionSet?: string[];
17
+ signingName?: string;
18
+ }
19
+ /**
20
+ * @internal
21
+ */
22
+ export declare const validateSigningProperties: (signingProperties: Record<string, unknown>) => Promise<AwsSdkSigV4AuthSigningProperties>;
23
+ /**
24
+ * @internal
25
+ * Note: this is not a signing algorithm implementation. The sign method
26
+ * accepts the real signer as an input parameter.
27
+ */
5
28
  export declare class AwsSdkSigV4Signer implements HttpSigner {
6
29
  sign(httpRequest: IHttpRequest,
7
30
  /**
@@ -15,3 +38,4 @@ export declare class AwsSdkSigV4Signer implements HttpSigner {
15
38
  * @deprecated renamed to {@link AwsSdkSigV4Signer}
16
39
  */
17
40
  export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer;
41
+ export {};
@@ -1,2 +1,3 @@
1
- export * from "./AwsSdkSigV4Signer";
1
+ export { AwsSdkSigV4Signer, AWSSDKSigV4Signer, validateSigningProperties } from "./AwsSdkSigV4Signer";
2
+ export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
2
3
  export * from "./resolveAwsSdkSigV4Config";
@@ -0,0 +1,15 @@
1
+ import { Provider } from "@smithy/types";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ export interface AccountIdEndpointModeInputConfig {
4
+ accountIdEndpointMode?:
5
+ | AccountIdEndpointMode
6
+ | Provider<AccountIdEndpointMode>;
7
+ }
8
+ interface PreviouslyResolved {}
9
+ export interface AccountIdEndpointModeResolvedConfig {
10
+ accountIdEndpointMode: Provider<AccountIdEndpointMode>;
11
+ }
12
+ export declare const resolveAccountIdEndpointModeConfig: <T>(
13
+ input: T & AccountIdEndpointModeInputConfig & PreviouslyResolved
14
+ ) => T & AccountIdEndpointModeResolvedConfig;
15
+ export {};
@@ -0,0 +1,6 @@
1
+ export type AccountIdEndpointMode = "disabled" | "preferred" | "required";
2
+ export declare const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred";
3
+ export declare const ACCOUNT_ID_ENDPOINT_MODE_VALUES: AccountIdEndpointMode[];
4
+ export declare function validateAccountIdEndpointMode(
5
+ value: any
6
+ ): value is AccountIdEndpointMode;
@@ -0,0 +1,7 @@
1
+ import { LoadedConfigSelectors } from "@smithy/node-config-provider";
2
+ import { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
3
+ export declare const ENV_ACCOUNT_ID_ENDPOINT_MODE =
4
+ "AWS_ACCOUNT_ID_ENDPOINT_MODE";
5
+ export declare const CONFIG_ACCOUNT_ID_ENDPOINT_MODE =
6
+ "account_id_endpoint_mode";
7
+ export declare const NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<AccountIdEndpointMode>;
@@ -0,0 +1,3 @@
1
+ export * from "./AccountIdEndpointModeConfigResolver";
2
+ export * from "./AccountIdEndpointModeConstants";
3
+ export * from "./NodeAccountIdEndpointModeConfigOptions";
@@ -0,0 +1,12 @@
1
+ import {
2
+ AwsCredentialIdentity,
3
+ HttpRequest as IHttpRequest,
4
+ } from "@smithy/types";
5
+ import { AwsSdkSigV4Signer } from "./AwsSdkSigV4Signer";
6
+ export declare class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer {
7
+ sign(
8
+ httpRequest: IHttpRequest,
9
+ identity: AwsCredentialIdentity,
10
+ signingProperties: Record<string, unknown>
11
+ ): Promise<IHttpRequest>;
12
+ }
@@ -1,9 +1,25 @@
1
1
  import {
2
+ AuthScheme,
2
3
  AwsCredentialIdentity,
3
4
  HttpRequest as IHttpRequest,
4
5
  HttpResponse,
5
6
  HttpSigner,
7
+ RequestSigner,
6
8
  } from "@smithy/types";
9
+ interface AwsSdkSigV4Config {
10
+ systemClockOffset: number;
11
+ signer: (authScheme?: AuthScheme) => Promise<RequestSigner>;
12
+ }
13
+ interface AwsSdkSigV4AuthSigningProperties {
14
+ config: AwsSdkSigV4Config;
15
+ signer: RequestSigner;
16
+ signingRegion?: string;
17
+ signingRegionSet?: string[];
18
+ signingName?: string;
19
+ }
20
+ export declare const validateSigningProperties: (
21
+ signingProperties: Record<string, unknown>
22
+ ) => Promise<AwsSdkSigV4AuthSigningProperties>;
7
23
  export declare class AwsSdkSigV4Signer implements HttpSigner {
8
24
  sign(
9
25
  httpRequest: IHttpRequest,
@@ -19,3 +35,4 @@ export declare class AwsSdkSigV4Signer implements HttpSigner {
19
35
  ): void;
20
36
  }
21
37
  export declare const AWSSDKSigV4Signer: typeof AwsSdkSigV4Signer;
38
+ export {};
@@ -1,2 +1,7 @@
1
- export * from "./AwsSdkSigV4Signer";
1
+ export {
2
+ AwsSdkSigV4Signer,
3
+ AWSSDKSigV4Signer,
4
+ validateSigningProperties,
5
+ } from "./AwsSdkSigV4Signer";
6
+ export { AwsSdkSigV4ASigner } from "./AwsSdkSigV4ASigner";
2
7
  export * from "./resolveAwsSdkSigV4Config";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.620.0",
3
+ "version": "3.624.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -46,6 +46,13 @@
46
46
  "require": "./dist-cjs/submodules/httpAuthSchemes/index.js",
47
47
  "types": "./dist-types/submodules/httpAuthSchemes/index.d.ts"
48
48
  },
49
+ "./account-id-endpoint": {
50
+ "module": "./dist-es/submodules/account-id-endpoint/index.js",
51
+ "node": "./dist-cjs/submodules/account-id-endpoint/index.js",
52
+ "import": "./dist-es/submodules/account-id-endpoint/index.js",
53
+ "require": "./dist-cjs/submodules/account-id-endpoint/index.js",
54
+ "types": "./dist-types/submodules/account-id-endpoint/index.d.ts"
55
+ },
49
56
  "./protocols": {
50
57
  "module": "./dist-es/submodules/protocols/index.js",
51
58
  "node": "./dist-cjs/submodules/protocols/index.js",
@@ -58,7 +65,8 @@
58
65
  "dist-*/**",
59
66
  "./client.js",
60
67
  "./httpAuthSchemes.js",
61
- "./protocols.js"
68
+ "./protocols.js",
69
+ "./account-id-endpoint.js"
62
70
  ],
63
71
  "sideEffects": false,
64
72
  "author": {
@@ -67,12 +75,14 @@
67
75
  },
68
76
  "license": "Apache-2.0",
69
77
  "dependencies": {
70
- "@smithy/core": "^2.3.0",
78
+ "@smithy/core": "^2.3.2",
79
+ "@smithy/node-config-provider": "^3.1.4",
71
80
  "@smithy/protocol-http": "^4.1.0",
72
81
  "@smithy/signature-v4": "^4.1.0",
73
- "@smithy/smithy-client": "^3.1.10",
82
+ "@smithy/smithy-client": "^3.1.12",
74
83
  "@smithy/types": "^3.3.0",
75
- "fast-xml-parser": "4.2.5",
84
+ "@smithy/util-middleware": "^3.0.3",
85
+ "fast-xml-parser": "4.4.1",
76
86
  "tslib": "^2.6.2"
77
87
  },
78
88
  "devDependencies": {
@@ -92,7 +102,7 @@
92
102
  ]
93
103
  }
94
104
  },
95
- "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/master/packages/core",
105
+ "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/core",
96
106
  "repository": {
97
107
  "type": "git",
98
108
  "url": "https://github.com/aws/aws-sdk-js-v3.git",
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  // src/index.ts
22
22
  var src_exports = {};
23
23
  __export(src_exports, {
24
+ ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,
24
25
  ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
25
26
  ENV_EXPIRATION: () => ENV_EXPIRATION,
26
27
  ENV_KEY: () => ENV_KEY,
@@ -37,6 +38,7 @@ var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
37
38
  var ENV_SESSION = "AWS_SESSION_TOKEN";
38
39
  var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
39
40
  var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
41
+ var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
40
42
  var fromEnv = /* @__PURE__ */ __name((init) => async () => {
41
43
  var _a;
42
44
  (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env - fromEnv");
@@ -45,13 +47,15 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
45
47
  const sessionToken = process.env[ENV_SESSION];
46
48
  const expiry = process.env[ENV_EXPIRATION];
47
49
  const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
50
+ const accountId = process.env[ENV_ACCOUNT_ID];
48
51
  if (accessKeyId && secretAccessKey) {
49
52
  return {
50
53
  accessKeyId,
51
54
  secretAccessKey,
52
55
  ...sessionToken && { sessionToken },
53
56
  ...expiry && { expiration: new Date(expiry) },
54
- ...credentialScope && { credentialScope }
57
+ ...credentialScope && { credentialScope },
58
+ ...accountId && { accountId }
55
59
  };
56
60
  }
57
61
  throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init == null ? void 0 : init.logger });
@@ -64,6 +68,7 @@ var fromEnv = /* @__PURE__ */ __name((init) => async () => {
64
68
  ENV_SESSION,
65
69
  ENV_EXPIRATION,
66
70
  ENV_CREDENTIAL_SCOPE,
71
+ ENV_ACCOUNT_ID,
67
72
  fromEnv
68
73
  });
69
74
 
@@ -4,6 +4,7 @@ export const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
4
4
  export const ENV_SESSION = "AWS_SESSION_TOKEN";
5
5
  export const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
6
6
  export const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
7
+ export const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
7
8
  export const fromEnv = (init) => async () => {
8
9
  init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
9
10
  const accessKeyId = process.env[ENV_KEY];
@@ -11,6 +12,7 @@ export const fromEnv = (init) => async () => {
11
12
  const sessionToken = process.env[ENV_SESSION];
12
13
  const expiry = process.env[ENV_EXPIRATION];
13
14
  const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
15
+ const accountId = process.env[ENV_ACCOUNT_ID];
14
16
  if (accessKeyId && secretAccessKey) {
15
17
  return {
16
18
  accessKeyId,
@@ -18,6 +20,7 @@ export const fromEnv = (init) => async () => {
18
20
  ...(sessionToken && { sessionToken }),
19
21
  ...(expiry && { expiration: new Date(expiry) }),
20
22
  ...(credentialScope && { credentialScope }),
23
+ ...(accountId && { accountId }),
21
24
  };
22
25
  }
23
26
  throw new CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
@@ -22,6 +22,10 @@ export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
22
22
  * @internal
23
23
  */
24
24
  export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
25
+ /**
26
+ * @internal
27
+ */
28
+ export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
25
29
  /**
26
30
  * @internal
27
31
  *
@@ -6,6 +6,7 @@ export declare const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
6
6
  export declare const ENV_SESSION = "AWS_SESSION_TOKEN";
7
7
  export declare const ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
8
8
  export declare const ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
9
+ export declare const ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
9
10
  export declare const fromEnv: (
10
11
  init?: FromEnvInit
11
12
  ) => AwsCredentialIdentityProvider;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-env",
3
- "version": "3.609.0",
3
+ "version": "3.620.1",
4
4
  "description": "AWS credential provider that sources credentials from known environment variables",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-http",
3
- "version": "3.620.0",
3
+ "version": "3.622.0",
4
4
  "description": "AWS credential provider for containers and HTTP sources",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -27,13 +27,13 @@
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
29
  "@aws-sdk/types": "3.609.0",
30
- "@smithy/fetch-http-handler": "^3.2.3",
30
+ "@smithy/fetch-http-handler": "^3.2.4",
31
31
  "@smithy/node-http-handler": "^3.1.4",
32
32
  "@smithy/property-provider": "^3.1.3",
33
33
  "@smithy/protocol-http": "^4.1.0",
34
- "@smithy/smithy-client": "^3.1.10",
34
+ "@smithy/smithy-client": "^3.1.12",
35
35
  "@smithy/types": "^3.3.0",
36
- "@smithy/util-stream": "^3.1.2",
36
+ "@smithy/util-stream": "^3.1.3",
37
37
  "tslib": "^2.6.2"
38
38
  },
39
39
  "devDependencies": {
@@ -180,7 +180,7 @@ var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {})
180
180
  var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
181
181
 
182
182
  // src/resolveStaticCredentials.ts
183
- var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile");
183
+ var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
184
184
  var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
185
185
  var _a;
186
186
  (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
@@ -188,7 +188,8 @@ var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {
188
188
  accessKeyId: profile.aws_access_key_id,
189
189
  secretAccessKey: profile.aws_secret_access_key,
190
190
  sessionToken: profile.aws_session_token,
191
- credentialScope: profile.aws_credential_scope
191
+ ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
192
+ ...profile.aws_account_id && { accountId: profile.aws_account_id }
192
193
  });
193
194
  }, "resolveStaticCredentials");
194
195
 
@@ -2,13 +2,15 @@ export const isStaticCredsProfile = (arg) => Boolean(arg) &&
2
2
  typeof arg === "object" &&
3
3
  typeof arg.aws_access_key_id === "string" &&
4
4
  typeof arg.aws_secret_access_key === "string" &&
5
- ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1;
5
+ ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 &&
6
+ ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
6
7
  export const resolveStaticCredentials = (profile, options) => {
7
8
  options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
8
9
  return Promise.resolve({
9
10
  accessKeyId: profile.aws_access_key_id,
10
11
  secretAccessKey: profile.aws_secret_access_key,
11
12
  sessionToken: profile.aws_session_token,
12
- credentialScope: profile.aws_credential_scope,
13
+ ...(profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }),
14
+ ...(profile.aws_account_id && { accountId: profile.aws_account_id }),
13
15
  });
14
16
  };