[英]What AWS permission are required to run a particular AWS CLI command
我正在嘗試設置一個 ec2 實例(一個角色與這個實例相關聯)。 這個實例負責
我正在運行以下 3 個命令。 前 2 個執行成功。
aws s3 cp api-service-build.zip s3://build-bucket/api-service/2022-11-2022.zip
aws elasticbeanstalk create-application-version
--application-name api-service-stage
--version-label v5
--description "Version 5"
--source-bundle S3Bucket="build-bucket",S3Key="api-service/2022-11-2022.zip"
但是當我嘗試運行第三個命令時它無法部署(請注意 CLI 它沒有失敗)
aws elasticbeanstalk update-environment
--environment-name api-service-stage-env
--version-label v5
在 beantalk web console
上,我可以看到以下錯誤
User: arn:aws:sts::xxxxxxxxx:assumed-role/MyAssumedRole/i-xxxxxx is not authorized to perform: autoscaling:DescribeAutoScalingGroups because no identity-based policy allows the autoscaling:DescribeAutoScalingGroups action (Service: AmazonAutoScaling; Status Code: 403; Error Code: AccessDenied;
我已經更新了我的政策超過 30 次,以達到上述點,但又一次權限錯誤。
有沒有一種方法或工具,我可以在其中粘貼我的命令,它會告訴我運行此命令需要什么權限
到目前為止,我在 MyAssumedRoles 中添加的權限如下,我已經添加了很多點擊和嘗試,但它詢問另一個自動縮放。
根據錯誤,您缺少 AutoScaling 權限。 它們與您已經添加的不同。 最好的測試方法是使用 AWS Policy Simulator。 請按照以下步驟操作:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.