使用DMS向Redshift Serverless复制数据所需要的IAM Role

更新了Redshift加载IAM Role的说明

一、背景

在使用DMS向Redshift Serverless复制数据的过程中,添加Redshift Serverless为Target Endpoint,然后按下测试按钮,此时后收到报错:

Role 'dms-access-for-endpoint' is not configured properly.

根据有关文档,配置完成这个IAM Role后,开始Redshift复制任务,又会遇到错误,在DMS生成的CloudWatch日志中,出现如下错误:

2023-10-31T15:12:44 [TARGET_LOAD     ]E:  RetCode: SQL_ERROR  SqlState: XX000 NativeError: 30 Message: [Amazon][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState XX000] ERROR:  exception name : UnauthorizedException, error type : 135, message: The requested role arn:aws:iam::1xxxxxxx:role/dms-access-for-endpoint is not associated to cluster, should retry : 0 DETAIL:     -----------------------------------------------   error:  exception name : UnauthorizedException, error type : 135, message: The requested role arn:aws:iam::133129065110:role/dms-access-for-endpoint is not associated to cluster, should retry : 0   code:      30000   context:      query:     409714[child_sequence:1]   location:  xen_aws_credentials_mgr.cpp:422   process:   padbmaster [pid=1073955240]   -----------------------------------------------  [1022500]  (ar_odbc_stmt.c:5007)

如何让DMS能够正确的连接到Redshift Serverless?

Continue reading “使用DMS向Redshift Serverless复制数据所需要的IAM Role”