Upgrade current to support both retail and classic, as well as more regions
This commit is contained in:
parent
8df4a92c32
commit
3e7aa429fa
@ -8,7 +8,7 @@ dynamo_region_map = {
|
||||
'us-west-2': 'us-west-2',
|
||||
'us-east-1': 'us-east-1',
|
||||
'us-east-2': 'us-east-2',
|
||||
'ap-south-1': 'eu-north-1',
|
||||
'ap-south-1': 'ap-south-1',
|
||||
'ap-northeast-3': 'ap-northeast-1',
|
||||
'ap-northeast-2': 'ap-northeast-1',
|
||||
'ap-southeast-1': 'ap-southeast-1',
|
||||
@ -16,9 +16,9 @@ dynamo_region_map = {
|
||||
'ap-northeast-1': 'ap-northeast-1',
|
||||
'ca-central-1': 'us-east-1',
|
||||
'eu-central-1': 'eu-north-1',
|
||||
'eu-west-1': 'eu-north-1',
|
||||
'eu-west-2': 'eu-north-1',
|
||||
'eu-west-3': 'eu-north-1',
|
||||
'eu-west-1': 'eu-west-1',
|
||||
'eu-west-2': 'eu-west-1',
|
||||
'eu-west-3': 'eu-west-3',
|
||||
'eu-north-1': 'eu-north-1',
|
||||
'sa-east-1': 'sa-east-1',
|
||||
'eu-south-1': 'eu-north-1'
|
||||
@ -27,7 +27,7 @@ local_region = ''
|
||||
if os.environ['AWS_REGION'] in dynamo_region_map:
|
||||
local_region = dynamo_region_map[os.environ['AWS_REGION']]
|
||||
else:
|
||||
local_region = 'eu-north-1'
|
||||
local_region = 'eu-central-1'
|
||||
|
||||
dynamodb_client = boto3.resource('dynamodb', region_name=local_region)
|
||||
retail_table = dynamodb_client.Table('wow-token-price')
|
||||
|
Loading…
Reference in New Issue
Block a user