首页 > 解决方案 > 用于自动扩展的 AWS Codestar 设置 Beanstalk 策略错误

问题描述

我一直在尝试使用 Elastic Beanstalk 在 AWS Ruby on Rails 上使用 Codestar。我尝试应用和分配 Auto Scaling 完全访问策略无济于事。任何人都可以帮助我解决这些错误吗?也使用root帐户。尝试在角色下分配它,但没有成功。

错误信息:

Creating Auto Scaling group failed Reason: API: autoscaling:CreateAutoScalingGroup The default Service-Linked Role for Auto Scaling could not be created. com.amazonaws.services.identitymanagement.model.AmazonIdentityManagementException: 
User: arn:aws:sts::**********:assumed-role/CodeStarWorker-phcnetworks-net-CloudFormation/AWSCloudFormation is not authorized to perform: iam:CreateServiceLinkedRole on resource: arn:aws:iam::**************:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling 
(Service: AmazonIdentityManagement; Status Code: 403; Error Code: AccessDenied; Request ID: *******-******-*******)

Stack named 'awseb-e-*********-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBAutoScalingGroup].

标签: amazon-web-servicesamazon-cloudformationautoscalingamazon-elastic-beanstalkaws-codestar

解决方案


报告的错误表明角色“CodeStarWorker-phcnetworks-net-CloudFormation”无权对 IAM 策略中定义的资源集执行操作 iam:CreateServiceLinkedRole。因此需要将操作“CreateServiceLinkedRole”添加到角色中以进行自动缩放政策取得成功。


推荐阅读