承担角色、信任关系问题
assuming role, trust relationship issues
我正在使用 codedeploy 将我的代码部署到服务器。 3 天前它工作正常。但是突然间它无法发挥作用,尽管它之前工作正常。
error : {
"Code" : "AssumeRoleUnauthorizedAccess",
"Message" : "EC2 cannot assume the role Ec2Codedeploy"}
"LastUpdated":“2017-07-10T06:49:59Z”
我的信任关系是:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "codedeploy.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
文档之间也存在矛盾。
没有。 1 表示服务应该是 "codedeploy.amazonaws.com"
no.2 说服务应该是 "ec2.amazonaws.com"
重启后问题仍然存在。
请帮助我解决这个问题。
您似乎拥有一个专供 AWS CodeDeploy 使用的角色,但您已将其分配给 Amazon EC2 实例。错误消息表明了这一点:EC2 cannot assume the role Ec2Codedeploy
来自Create a Service Role for AWS CodeDeploy:
The service role you create for AWS CodeDeploy must be granted the permissions to access the instances to which you will deploy applications. These permissions enable AWS CodeDeploy to read the tags applied to the instances or the Auto Scaling group names associated with the instances.
The permissions you add to the service role specify the operations AWS CodeDeploy can perform when it accesses your Amazon EC2 instances and Auto Scaling groups. To add these permissions, attach an AWS-supplied policy, AWSCodeDeployRole
, to the service role.
这与您分配给 Amazon EC2 实例 的角色是分开的,它生成实例上的应用程序可以使用的凭据。
这些应该是具有不同分配权限的两个独立角色。
我正在使用 codedeploy 将我的代码部署到服务器。 3 天前它工作正常。但是突然间它无法发挥作用,尽管它之前工作正常。
error : {
"Code" : "AssumeRoleUnauthorizedAccess",
"Message" : "EC2 cannot assume the role Ec2Codedeploy"}
"LastUpdated":“2017-07-10T06:49:59Z”
我的信任关系是:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "codedeploy.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
文档之间也存在矛盾。
没有。 1 表示服务应该是 "codedeploy.amazonaws.com"
no.2 说服务应该是 "ec2.amazonaws.com"
重启后问题仍然存在。
请帮助我解决这个问题。
您似乎拥有一个专供 AWS CodeDeploy 使用的角色,但您已将其分配给 Amazon EC2 实例。错误消息表明了这一点:EC2 cannot assume the role Ec2Codedeploy
来自Create a Service Role for AWS CodeDeploy:
The service role you create for AWS CodeDeploy must be granted the permissions to access the instances to which you will deploy applications. These permissions enable AWS CodeDeploy to read the tags applied to the instances or the Auto Scaling group names associated with the instances.
The permissions you add to the service role specify the operations AWS CodeDeploy can perform when it accesses your Amazon EC2 instances and Auto Scaling groups. To add these permissions, attach an AWS-supplied policy,
AWSCodeDeployRole
, to the service role.
这与您分配给 Amazon EC2 实例 的角色是分开的,它生成实例上的应用程序可以使用的凭据。
这些应该是具有不同分配权限的两个独立角色。