简体   繁体   English

有没有一种方法可以创建RDS实例的跨区域只读副本?

[英]Is there a way to create a cross-region read only replica of an RDS instance?

I need to create a read only replica in a different region via Ansible. 我需要通过Ansible在其他区域中创建一个只读副本。

The docs don't seem to mention if this is possible. 文档似乎没有提到这是否可行。 They only mention normal read only replicas: 他们只提到普通的只读副本:

# Create a read-only replica and wait for it to become available
- rds:
    command: replicate
    instance_name: new-database-replica
    source_instance: new_database
    wait: yes
    wait_timeout: 600

When creating cross region replicas it works pretty much exactly the same as creating normal read replicas except that instead of specifying the instance identifier you must specify the full ARN. 创建跨区域副本时,其工作原理与创建普通只读副本几乎完全相同,除了必须指定完整的ARN而不是指定实例标识符。 This then means that if you have a source instance called my-mysql-instance in US East 1 in the account 123456789012 then your ARN (and so instance_name parameter to the RDS module) will look like this: 这意味着如果您在帐户123456789012中的US East 1中有一个名为my-mysql-instance的源实例,则您的ARN(以及RDS模块的instance_name参数)将如下所示:

arn:aws:rds:us-east-1:123456789012:db:my-mysql-instance

So you just need to adapt the replicate task from the docs to be something like this: 因此,您只需要将文档中的复制任务修改为如下所示:

- rds:
    command: replicate
    region: eu-west-1
    instance_name: new-database-replica
    source_instance: arn:aws:rds:us-east-1:123456789012:db:my-mysql-instance
    wait: yes
    wait_timeout: 600

This will create a new read replica in EU West 1 (Ireland) called new-database-replica from a source database instance called my-mysql-instance in US West 1. 这将在US West 1(爱尔兰)中的源数据库实例my-mysql-instance中,在EU West 1(爱尔兰)中创建一个名为new-database-replica的新只读副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 避免RDS实例跨地域调用 - Avoid cross-region call on RDS instance AWS RDS MySQL 跨区域复制 - AWS RDS MySQL Cross-region replication Terraform AWS RDS 实例跨区域复制 - US-west-1 中的只读副本 - Terraform AWS RDS Instance Cross Region Replication - Read Replica in US-west-1 AWS RDS Aurora - 跨区域只读副本同时具有写入和读取实例? - AWS RDS Aurora - Cross Region Read Replica has both Write and Reader instance? 使用 AWS Global Accelerator 的跨区域只读副本与单个只读副本 - Cross-region Read Replicas vs One Read Replica with AWS Global Accelerator AWS RDS aurora-通过boto3或AWS CLI创建跨区域读取副本 - AWS RDS aurora - create cross region read replica - via boto3 or aws cli 我们如何使用 AWS 云形成模板创建跨区域 RDS 只读副本? - How can we create cross region RDS read replica using AWS cloud formation template? AWS RDS 跨区域只读副本是否也复制用户和角色? - Do AWS RDS cross-region read replicas also replicate users and roles? 跨地域副本 DyanmoDB 事务冲突处理 - Cross-region replica DyanmoDB transaction conflict handling 无法从加密源创建跨区域未加密只读副本 - Cannot create a cross region unencrypted read replica from encrypted source
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM