Skip to content

Send ddb region as awsCfg#5842

Merged
yeya24 merged 3 commits into
cortexproject:masterfrom
danielblando:ddbRegion
Mar 29, 2024
Merged

Send ddb region as awsCfg#5842
yeya24 merged 3 commits into
cortexproject:masterfrom
danielblando:ddbRegion

Conversation

@danielblando
Copy link
Copy Markdown
Contributor

What this PR does:
Send DynamoDB region as awsConfig instead of session config

Which issue(s) this PR fixes:
Fixes #5840

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
@danielblando danielblando marked this pull request as ready for review March 29, 2024 16:59
Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
}

awsCfg := aws.NewConfig()
if len(cfg.Region) > 0 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check still necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Region here is optional in the config.
I would need to do a test to see what the client will do if we send an empty string. I am not sure if it will try to use the env var.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool just a nit

@yeya24 yeya24 merged commit 65d218b into cortexproject:master Mar 29, 2024
alanprot pushed a commit to alanprot/cortex that referenced this pull request Apr 2, 2024
* Send ddb region as awsCfg

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

* Add changelog

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

* Fix lint

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>

---------

Signed-off-by: Daniel Deluiggi <ddeluigg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants