aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
2.96k stars 557 forks source link

what to put as a config? #6097

Closed dhavalpacewisdom closed 1 month ago

dhavalpacewisdom commented 1 month ago

Describe the issue

const client = new PersonalizeEventsClient(config); In the above line, could you mention what to put as a config?

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-events/command/PutEventsCommand/

aBurmeseDev commented 1 month ago

Hi @dhavalpacewisdom - thanks for reaching out.

For service-level configuration, you can pass in objects like region or credentials which you'll have significant control over your default local configuration. If those configurations aren't defined, SDK will use your local config.

For example: const client = new PersonalizeEventsClient({ region: 'us-east-1', credentials: {...} }); or if you have credentials configured locally, you can run it like const client = new PersonalizeEventsClient();

You can read more about it here: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/global-config-object.html

Hope it helps, John

github-actions[bot] commented 1 month ago

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.

github-actions[bot] commented 2 weeks ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.