aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.03k stars 569 forks source link

Ability to log version from SDK Client #6278

Open abhirpat opened 1 month ago

abhirpat commented 1 month ago

Describe the feature

I'd like to confirm the version of SDK client for troubleshooting purposes

const client = new BedrockAgentRuntimeClient({ region }));
console.log('Client Version: ', client.config.version) 

Similar to AWS SDK V2 and boto3 in python sdk

In AWS SDK V2

const AWS = require("aws-sdk"); 
console.log(AWS.VERSION);

In python sdk

import boto3
print(f'Boto version {boto3.__version__}')

Use Case

This can be used for troubleshooting purposes to confirm the version is correct.

Previous Issue 6278

Proposed Solution

No response

Other Information

No response

Acknowledgements

SDK version used

3.614.0

Environment details (OS name and version, etc.)

Node 18

kuhe commented 1 month ago

We should extract the version from package.json and put it in the client.config.

Preferably the extraction would also avoid importing the entirety of the package.json object.