AWS DMS-数据库迁移服务系统错误消息:IAM角色arn:aws:iam :: <account_id>:role / dms-vpc-role配置不正确

时间:2019-10-24 13:21:32

标签: amazon-web-services amazon-iam aws-dms

我正在尝试创建一个DMS(数据库迁移服务)实例,但是出现以下错误:

SYSTEM ERROR MESSAGE:The IAM Role arn:aws:iam::<account_id>:role/dms-vpc-role is not configured properly

我应该创建什么角色以及应该分配给谁?

2 个答案:

答案 0 :(得分:3)

您将需要允许DMS担任角色:

  1. 创建文件dmsAssumeRolePolicyDocument.json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "dms.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
  1. 创建角色:

aws iam create-role --role-name dms-vpc-role --assume-role-policy-document file:///tmp/dmsAssumeRolePolicyDocument.json

  1. 附加角色:

aws iam attach-role-policy --role-name dms-vpc-role --policy-arn arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole

现在您可以继续在控制台中或使用awscli创建DMS实例

答案 1 :(得分:1)

好像他们改变了IAM角色一样,如果现在有人尝试这样做,最简单的解决方案是在AWS控制台中创建一个复制实例,并且dms-vpc-role将自动创建。

然后,您可以删除该“临时”实例并运行cloudformation / aws cli创建所需的实例。

如果要手动创建角色,则附加的策略必须为AmazonDMSVPCManagementRole

并包含以下权限:

{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": [
            "ec2:CreateNetworkInterface",
            "ec2:DescribeAvailabilityZones",
            "ec2:DescribeInternetGateways",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeSubnets",
            "ec2:DescribeVpcs",
            "ec2:DeleteNetworkInterface",
            "ec2:ModifyNetworkInterfaceAttribute"
        ],
        "Resource": "*"
    }
]
}