Skip to content

Commit

Permalink
feat: add dynamo aws region config variable
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobernardoaf committed Feb 6, 2025
1 parent fbb179c commit a222aec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backends/rapidpro/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (b *backend) Start() error {
}

// setup DynamoDB
b.dynamo, err = dynamo.NewService(b.config.AWSAccessKeyID, b.config.AWSSecretAccessKey, b.config.AWSRegion, b.config.DynamoEndpoint, b.config.DynamoTablePrefix)
b.dynamo, err = dynamo.NewService(b.config.AWSAccessKeyID, b.config.AWSSecretAccessKey, b.config.DynamoAWSRegion, b.config.DynamoEndpoint, b.config.DynamoTablePrefix)
if err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Config struct {

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

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

DynamoEndpoint: "", // let library generate it
DynamoTablePrefix: "Temba",
DynamoAWSRegion: "us-east-1",

S3Endpoint: "https://s3.amazonaws.com",
S3AttachmentsBucket: "temba-attachments",
Expand Down

0 comments on commit a222aec

Please sign in to comment.