use*_*990 6 amazon-s3 amazon-web-services amazon-rds
我正在尝试将数据从 s3 存储桶加载到亚马逊 RDS 数据库。我知道这不是编程问题。但我真的很感激帮助。我使用了下面的代码:
aws rds restore-db-instance-from-s3 ^
--allocated-storage 250 ^
--db-instance-identifier myidentifier ^
--db-instance-class db.m4.large ^
--engine mysql ^
--master-user-name masterawsuser ^
--master-user-password masteruserpassword ^
--s3-bucket-name mybucket ^
--s3-ingestion-role-arn arn:aws:iam::account-number:role/rolename ^
--s3-prefix bucketprefix ^
--source-engine mysql ^
--source-engine-version 5.6.27
Run Code Online (Sandbox Code Playgroud)
但是我收到了以下错误,尽管我给出了正确的 ARN 编号:
“An error occurred (InvalidParameterValue) when calling the RestoreDBInstanceFrom S3 operation: IAM role ARN value is invalid or does not include the required permissions for: S3_SNAPSHOT_INGESTION”
Run Code Online (Sandbox Code Playgroud)
对此有何评论?
谢谢
小智 6
我迟到了,但这是谷歌上的第一名,我花了大约一个小时来解决这个问题。
该错误消息有点误导。它与您附加到 RDS 的角色或策略无关。就我而言,我登录的帐户没有使用具有适当权限的角色。在 AWS 中IAM,我添加了策略AmazonS3FullAccess并添加AmazonRDSFullAccess到我的用户帐户(嗯,实际上将它们添加到我担任的角色中,因为我使用的是联合企业访问)。
一旦我这样做了,错误消息就消失了,我能够从 S3 恢复