首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller:缺少凭据-请检查此实例是否使用IAM实例配置文件启动。

InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller:缺少凭据-请检查此实例是否使用IAM实例配置文件启动。
EN

Stack Overflow用户
提问于 2022-08-01 11:53:17
回答 1查看 269关注 0票数 1

如果我尝试使用AWS从GitHub项目运行部署到EC2实例,则从/var/log/aws/codedeploy-agent/codedeploy-agent.log获得以下错误消息

代码语言:javascript
复制
2022-08-01 11:07:25 INFO  [codedeploy-agent(3386)]: master 3386: Spawned child 1/1
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: On Premises config file does not exist or not readable
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-2.amazonaws.com
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandExecutor: Archives to retain is: 5}
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-2.amazonaws.com
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: CodeDeploy endpoint: https://codedeploy-commands.us-east-2.amazonaws.com
2022-08-01 11:07:25 INFO  [codedeploy-agent(3388)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.3.2-1902_deb.
2022-08-01 11:07:25 ERROR [codedeploy-agent(3388)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Missing credentials - please check if this instance was started with an IAM instance profile
2022-08-01 11:07:26 INFO  [codedeploy-agent(3386)]: Started master 3386 with 1 children
2022-08-01 11:07:36 INFO  [codedeploy-agent(3388)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.3.2-1902_deb.
2022-08-01 11:07:36 ERROR [codedeploy-agent(3388)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Missing credentials - please check if this instance was started with an IAM instance profile
2022-08-01 11:07:49 INFO  [codedeploy-agent(3388)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.3.2-1902_deb.
2022-08-01 11:07:49 ERROR [codedeploy-agent(3388)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Missing credentials - please check if this instance was started with an IAM instance profile

EC2实例分配了IAM角色:

IAM权限策略

IAM信任关系

代码语言:javascript
复制
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "ec2.amazonaws.com",
                    "codedeploy.amazonaws.com"
                ]
            },
            "Action": "sts:AssumeRole"
        }
    ]
}

我尝试重新启动ec2实例并通过命令重新启动代码部署代理:

代码语言:javascript
复制
sudo service codedeploy-agent restart

但这没什么用

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-02 08:16:13

IAM角色缺少AmazonS3ReadOnlyAccess权限。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73193243

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档