Skip to content

Commit 55cd758

Browse files
authored
Merge pull request #168 from Ilhasoft/feat/dynamo-aws-region
feat: add dynamo aws region config variable
2 parents fbb179c + a222aec commit 55cd758

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: backends/rapidpro/backend.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (b *backend) Start() error {
174174
}
175175

176176
// setup DynamoDB
177-
b.dynamo, err = dynamo.NewService(b.config.AWSAccessKeyID, b.config.AWSSecretAccessKey, b.config.AWSRegion, b.config.DynamoEndpoint, b.config.DynamoTablePrefix)
177+
b.dynamo, err = dynamo.NewService(b.config.AWSAccessKeyID, b.config.AWSSecretAccessKey, b.config.DynamoAWSRegion, b.config.DynamoEndpoint, b.config.DynamoTablePrefix)
178178
if err != nil {
179179
return err
180180
}

Diff for: config.go

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type Config struct {
3636

3737
DynamoEndpoint string `help:"DynamoDB service endpoint, e.g. https://dynamodb.us-east-1.amazonaws.com"`
3838
DynamoTablePrefix string `help:"prefix to use for DynamoDB tables"`
39+
DynamoAWSRegion string `help:"region to use for DynamoDB services, e.g. us-east-1"`
3940

4041
S3Endpoint string `help:"S3 service endpoint, e.g. https://s3.amazonaws.com"`
4142
S3AttachmentsBucket string `help:"S3 bucket to write attachments to"`
@@ -87,6 +88,7 @@ func NewDefaultConfig() *Config {
8788

8889
DynamoEndpoint: "", // let library generate it
8990
DynamoTablePrefix: "Temba",
91+
DynamoAWSRegion: "us-east-1",
9092

9193
S3Endpoint: "https://s3.amazonaws.com",
9294
S3AttachmentsBucket: "temba-attachments",

0 commit comments

Comments
 (0)