SSM Automation 更新AMI镜像
生活随笔
收集整理的這篇文章主要介紹了
SSM Automation 更新AMI镜像
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、從AMI啟動一個實例
2、檢測安裝ssm agent
3、更新軟件包
4、停止實例
5、根據實例創建一個新的AMI鏡像
6、終止實例
以上流程完全可以通過ssm 中 Automation 的 AWS-UpdateLinuxAmi 文檔搞定。但是在運行過程中一直遇到權限問題(完全按照aws 文檔操作配置)。
后經過google得以解決,整理如下:
1、配置完畢了實例role 和 ssm自動化服務role,但是運行中報如下錯誤
Automation Step Execution fails when it is launching the instance(s). Get Exception from RunInstances API of ec2 Service.Exception Message from RunInstances API: [You are not authorized to perform this operation.
Encoded authorization failure message: {{BIG NASTY BASE64 ERROR}} (Service: AmazonEC2; Status Code: 403; Error Code:
UnauthorizedOperation; Request ID: e7feb002-b375–4bfc-3bd4–633943b9e158)]. Please refer to Automation Service Troubleshooting Guide for more diagnosis details.
2、處理方法:把以下策略添加到 AutomationAssumeRole 角色中可以解決以上問題,我遇到的情況連第二步校驗超時問題也同時被解決掉了。
{"Version": "2012-10-17","Statement": [{"Sid": "GrantsAccessToIAMRoles","Effect": "Allow","Action": ["iam:*"],"Resource": ["arn:aws:iam::AWS-ACCOUNT-NUMBER:role/*"]}] }?
轉載于:https://www.cnblogs.com/husbandmen/p/10566601.html
總結
以上是生活随笔為你收集整理的SSM Automation 更新AMI镜像的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 锐动SDK针对游戏直播提出的解决方案
- 下一篇: 三、vSphere 6.7 U1(三):