amazon-web-services - 用于自动扩展的 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].
解决方案
报告的错误表明角色“CodeStarWorker-phcnetworks-net-CloudFormation”无权对 IAM 策略中定义的资源集执行操作 iam:CreateServiceLinkedRole。因此需要将操作“CreateServiceLinkedRole”添加到角色中以进行自动缩放政策取得成功。
推荐阅读
- angular - 使用 Angular Universal 和 Webpack Server 时未定义 @ng-idle/core 文档
- sql - 如何使用gorm更新sql中的嵌套表?
- kubernetes - 如何在 Google Cloud Platform 上部署 GRPC 服务器和客户端?
- typo3 - 是否可以禁用 TYPO3 TCA 记录的翻译
- php - 如何禁用 symfony 表单中的必填字段?
- css - 如何正确生成 Sass 主题
- java - inputStream = new FileInputStream(path) 不工作
- mysql - 可以使用分析/窗口函数来查找以其他单词开头的单词子集吗?
- dart - Flutter - 基于第一个下拉列表中选择的选项的下拉选项
- javascript - 更改自定义主题 Material-UI