找不到 AWS 新创建的 RDS 快照
AWS Newly created RDS snapshot is not found
我在 AWS 账户中有一个 RDS 数据库 运行。我想将其复制到另一个帐户以用作新部署应用程序的基础。我这样使用 CLI:
aws rds create-db-cluster-snapshot \
--db-cluster-snapshot-identifier snapid \
--db-cluster-identifier rdsid
此命令成功(如果我登录到 AWS 控制台,我可以看到新的快照)。但是当我尝试使用
修改它的属性时
aws rds modify-db-snapshot-attribute \
--db-snapshot-identifier snapid \
--attribute-name restore \
--values-to-add '["other_account_id"]'
然后我得到以下错误:
An error occurred (DBSnapshotNotFound) when calling the ModifyDBSnapshotAttribute operation: DBSnapshot not found: snapid
如果我可以共享快照,我就可以使用此快照在其他帐户中创建一个新实例。
有没有更好的跨账号共享RDS实例的方法?
您有点混淆了 API 调用。您应该使用如下所示的匹配命令对之一。
Aurora 数据库集群API
create-db-cluster-snapshot - Creates a snapshot of an Aurora DB cluster.
modify-db-cluster-snapshot-attribute - Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
RDS 数据库 API
create-db-snapshot - Creates a database snapshot.
modify-db-snapshot-attribute - Adds an attribute and values to, or removes an attribute and values from, a manual DB snapshot.
我在 AWS 账户中有一个 RDS 数据库 运行。我想将其复制到另一个帐户以用作新部署应用程序的基础。我这样使用 CLI:
aws rds create-db-cluster-snapshot \
--db-cluster-snapshot-identifier snapid \
--db-cluster-identifier rdsid
此命令成功(如果我登录到 AWS 控制台,我可以看到新的快照)。但是当我尝试使用
修改它的属性时aws rds modify-db-snapshot-attribute \
--db-snapshot-identifier snapid \
--attribute-name restore \
--values-to-add '["other_account_id"]'
然后我得到以下错误:
An error occurred (DBSnapshotNotFound) when calling the ModifyDBSnapshotAttribute operation: DBSnapshot not found: snapid
如果我可以共享快照,我就可以使用此快照在其他帐户中创建一个新实例。
有没有更好的跨账号共享RDS实例的方法?
您有点混淆了 API 调用。您应该使用如下所示的匹配命令对之一。
Aurora 数据库集群API
create-db-cluster-snapshot - Creates a snapshot of an Aurora DB cluster.
modify-db-cluster-snapshot-attribute - Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
RDS 数据库 API
create-db-snapshot - Creates a database snapshot.
modify-db-snapshot-attribute - Adds an attribute and values to, or removes an attribute and values from, a manual DB snapshot.