zoukankan      html  css  js  c++  java
  • 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/*"
                   ]
            }
        ]
    }
  • 相关阅读:
    安装python包
    在RHEL5.4上升级Python
    IronPython开发Windows Form程序总结
    Windows下手动配置Oracle Client的要点
    dreampie一个很不错的python命令行交互工具
    Eclipse插件汇总
    pyDbRowFactory Python版Db Row Factory
    如何让Jython自动加载一个Jar包
    跨计算机执行的几个方法
    Python 版 Instance Activator
  • 原文地址:https://www.cnblogs.com/husbandmen/p/10566601.html
Copyright © 2011-2022 走看看