无法使用codedeploy在ec2实例上部署代码



我有一个ec2实例运行在ubuntu服务器上,我正试图实现CI/CD流使用codedeploy和源是位桶。我还在ec2实例上安装了codedeploy-agent,它已安装并成功运行,但每当我在ec2上部署代码时,部署失败,出现以下错误:

The overall deployment failed because too many individual instances failed deployment, too few 
healthy instances are available for deployment, or some instances in your deployment group are 
experiencing problems.

在我使用less /var/log/aws/codedeploy-agent/codedeploy-agent.log访问的CodeDeploy代理日志文件中显示以下错误:

ERROR [codedeploy-agent(31598)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: 
Missing credentials - please check if this instance was started with an IAM instance profile

我不明白我怎么才能克服这个错误,有人告诉我。

CodeDeploy代理需要实例的IAM角色/配置文件提供的IAM权限。所需的确切权限在AWS文档中给出:

  • 步骤4:为您的Amazon EC2实例创建IAM实例配置文件

相关内容

  • 没有找到相关文章

最新更新