从 Redshift 快照进行 Redshift 无服务器还原失败,且无资源策略

问题描述 投票:0回答:1

我将 Redshift 快照从账户 A 共享到账户 B。

当我尝试恢复帐户 B 中的快照时,出现

AccessDenied
异常,指出找不到资源策略:

文档没有提到这个错误以及如何解决它。我已验证适当的 KMS 权限已到位。

amazon-redshift snapshot amazon-redshift-serverless
1个回答
0
投票

经过深入研究,我发现您可以将资源策略应用于快照。公平地说,该错误表明没有资源策略,但我正在检查的文档中没有提到需要资源策略。

从拍摄快照的帐户运行此命令后,恢复成功了。

aws redshift-serverless \
  put-resource-policy \
  --resource-arn arn:aws:redshift:<region>:<accountid>:snapshot:<redshift-cluster-name>/<snapshot-name> \
  --policy "{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"<accountid that is restoring the snapshot>\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
© www.soinside.com 2019 - 2024. All rights reserved.