Categories
JavaScript Answers

How to configure the region in Node.js AWS SDK?

Spread the love

Sometimes, we want to configure the region in Node.js AWS SDK.

In this article, we’ll look at how to configure the region in Node.js AWS SDK.

How to configure the region in Node.js AWS SDK?

To configure the region in Node.js AWS SDK, we can call the aws.config.update method.

For instance, we write

const AWS = require('aws-sdk');
AWS.config.update({
  region: 'us-east-1'
});

const dd = new AWS.DynamoDB();
const s3 = new AWS.S3();

to set the region to 'us-east-1' with AWS.config.update.

Conclusion

To configure the region in Node.js AWS SDK, we can call the aws.config.update method.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *