AWS新创建的RDS快照未找到

Iri*_*dul 1 snapshot amazon-web-services

我有一个在 AWS 账户中运行的 RDS 数据库。我想将其复制到另一个帐户以用作应用程序新部署的基础。我像这样使用 CLI:

aws rds create-db-cluster-snapshot \ 
  --db-cluster-snapshot-identifier snapid \
  --db-cluster-identifier rdsid 
Run Code Online (Sandbox Code Playgroud)

此命令成功(如果我登录 AWS 控制台,我可以看到新的快照)。但是当我尝试使用修改其属性时

aws rds modify-db-snapshot-attribute \
  --db-snapshot-identifier snapid \
  --attribute-name restore \ 
  --values-to-add '["other_account_id"]'
Run Code Online (Sandbox Code Playgroud)

然后我收到以下错误:
An error occurred (DBSnapshotNotFound) when calling the ModifyDBSnapshotAttribute operation: DBSnapshot not found: snapid

如果我可以共享快照,我就可以使用此快照在另一个帐户中创建一个新实例。

有没有更好的方法来跨账户共享RDS实例?

Vik*_*yol 5

您有点混淆了API调用。您应该使用如下所示的匹配命令对之一。

Aurora 数据库集群 API

create-db-cluster-snapshot - 创建 Aurora 数据库集群的快照。

modify-db-cluster-snapshot-attribute - 向手动数据库集群快照添加属性和值,或从中删除属性和值。

RDS数据库API

create-db-snapshot - 创建数据库快照。

modify-db-snapshot-attribute - 向手动数据库快照添加属性和值,或从中删除属性和值。