CodeDeploy内部部署注册失败,Amazon Lightsail上出现AccessDeniedException

问题描述 投票:0回答:1

aws部署本地实例上的注册--instance-name XXXXX --iam-user-arn arn:aws:iam :: XXXXXXXXXXXX:user / LightSailCodeDeployUser --region ap-south-1

An error occurred (AccessDeniedException) when calling the RegisterOnPremisesInstance operation: User: arn:aws:sts::XXXXXXXXXXX:assumed-role/AmazonLightsailInstanceRole/i-XXXXXXXXXXXXXX is not authorized to perform: codedeploy:RegisterOnPremisesInstance on resource: arn:aws:codedeploy:ap-south-1:XXXXXXXXXX:instance:XXXXXXXXXXXX

我什至没有创建角色AmazonLightsailInstanceRole,然后它是如何出现在图中的。我的用户虽然对codedeploy拥有所有权限。我正在跟踪此链接进行设置。 https://aws.amazon.com/blogs/compute/using-aws-codedeploy-and-aws-codepipeline-to-deploy-applications-to-amazon-lightsail/

amazon-web-services aws-code-deploy amazon-lightsail
1个回答
0
投票

与服务相关联的角色由服务

predefined所包含,并包括该服务代表您调用其他AWS服务所需的所有权限。

您遇到的错误与您没有codedeploy:RegisterOnPremisesInstance权限有关。

错误是关于AmazonLightsailInstanceRole没有错误。您(即您的IAM用户)是否具有所有CodeDeploy权限都没有关系。

通常,您会向角色添加缺少的权限。以下AWS文档中描述了如何使用AmazonLightsailInstanceRole

  • 但是,我不确定您是否可以修改AmazonLightsailInstanceRole并添加缺少的权限。可以修改某些与服务相关的角色,而有些则不能。
  • © www.soinside.com 2019 - 2024. All rights reserved.