UNPKG

@aws/bedrock-token-generator

Version:

A lightweight library for generating short-term bearer tokens for AWS Bedrock API authentication

29 lines 1.06 kB
"use strict"; /** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.getCreateTokenConfig = void 0; const credential_providers_1 = require("@aws-sdk/credential-providers"); const node_config_provider_1 = require("@smithy/node-config-provider"); const config_resolver_1 = require("@smithy/config-resolver"); /** * @internal */ const getCreateTokenConfig = (config) => { return { ...config, credentials: config.credentials ?? (0, credential_providers_1.fromNodeProviderChain)({ profile: config.profile, }), region: config.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, profile: config.profile, }), }; }; exports.getCreateTokenConfig = getCreateTokenConfig; //# sourceMappingURL=runtimeConfig.js.map