从Redshift表中卸载数据时出现以下错误
unload ('select * from tablename')
to 's3://bucketname/'
iam_role 'arn:aws:iam::123456789012:role/rolename';
ERROR: User arn:aws:redshift:eu-west-1:123456789012:dbuser:dbaname/dbusername is not authorized to assume IAM Role arn:aws:iam::123456789012:role/rolename
DETAIL:
-----------------------------------------------
error: User arn:aws:redshift:eu-west-1:123456789012:dbuser:dbname/dbusername is not authorized to assume IAM Role arn:aws:iam::123456789012:role/rolename
code: 8001
context: IAM Role=arn:aws:iam::123456789012:role/rolename
query: 0
location: xen_aws_credentials_mgr.cpp:238
process: padbmaster [pid=3203]
-----------------------------------------------
我使用切换角色使用角色名从一个帐户连接到另一个帐户,该角色在AWS上具有完全访问权限
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
答案 0 :(得分:0)
当我为Redshift创建新角色时,这对我有用。步骤概述如下
使用新创建的角色中的IAM角色。
答案 1 :(得分:0)
下面是我为解决此问题而解决的问题。
解决了上述问题,现在可以将数据从redshift卸载到S3。