Skip to content

Commit bffbd6e

Browse files
authored
Update README.md
1 parent cfdc66b commit bffbd6e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ var worker = new StepFunctionWorker({
3434
concurrency : 2 // default is 1
3535
});
3636
```
37+
#### Set the Region
38+
39+
By default, this package is built on top of `aws-sdk` so you should set your AWS Region by changing `AWS_REGION` environment variable.
40+
41+
If you want to set it in JS code directly you can do it using `awsConfig` (see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html to see all available options) like
42+
43+
```
44+
var worker = new StepFunctionWorker({
45+
activityArn : '<activity-ARN>',
46+
workerName : 'workerName',
47+
fn : fn,
48+
awsConfig: {
49+
region: '<your-region>'
50+
}
51+
});
52+
```
3753

3854
#### Close the worker
3955

@@ -79,3 +95,5 @@ worker.on('error', function(err){
7995

8096
### Documentation
8197

98+
See JSDoc in the code.
99+

0 commit comments

Comments
 (0)