[英]put_item in DDB Global Table uploads to wrong region
我在eu-west-3
區域創建了一個 Lambda function 來將一些數據從一個表放到另一個表中。
我使用boto3 ,我正在嘗試將 eu-west-3 區域中的一個 DDB 表中的項目放到eu-west-3
eu-west-3
區域中的另一個全局表中。
但是,我可以看到eu-west-3
中的全局表的大小為 - 0 字節,而us-west-2
中的全局表的大小為 9kb。 這是否意味着這些項目當前位於us-west-2
而不是eu-west-3?
我也明白這些應該在所有區域復制,但我仍然想寫到正確的區域。
GlobalTable 在 3 個區域有副本['eu-west-3', 'us-west-2', 'ap-southeast-1']
是否可以更改它並將項目實際放入eu-west-3?
existing_region = 'eu-west-3'
global_table = boto3.resource('dynamodb',
region_name=existing_region
).Table('GlobalTableName')
print("Updating table with data...")
with global_table.batch_writer() as batch:
for item in table_items:
batch.put_item(Item=item)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.