{"id":1581,"date":"2021-06-08T20:08:36","date_gmt":"2021-06-08T11:08:36","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/?p=1581"},"modified":"2021-06-08T20:08:36","modified_gmt":"2021-06-08T11:08:36","slug":"ssm-automation-patch","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2021\/06\/08\/ssm-automation-patch\/","title":{"rendered":"\u5b9f\u8df5\u30fbSystems Manager Automation\u301c\u300cEC2\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u53d6\u5f97\u304b\u3089\u30d1\u30c3\u30c1\u9069\u7528\u307e\u3067\u300d\u3092\u81ea\u52d5\u3067\u301c"},"content":{"rendered":"
\u7686\u3055\u3093\u306fEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306e\u30d1\u30c3\u30c1\u9069\u7528\u306f\u3069\u306e\u3088\u3046\u306b\u3084\u3063\u3066\u3044\u307e\u3059\u304b\uff1f<\/p>\n
\u3068\u3044\u3046\u5177\u5408\u3067\u3057\u3087\u3046\u304b\uff1f
\nPatch Manager\u3092\u4f7f\u3046\u3053\u3068\u3067\u30d1\u30c3\u30c1\u9069\u7528\u306f\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u306a\u304f\u884c\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u300cAMI\u53d6\u5f97\u5b8c\u4e86\u3092\u5f85\u3063\u305f\u306e\u3061\u306b\u3001\u30d1\u30c3\u30c1\u9069\u7528\u300d\u3068\u8a00\u3046\u306e\u304c\u6848\u5916\u6642\u9593\u304c\u304b\u304b\u308a\u3001\u5f85\u305f\u3055\u308c\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n
\u4eca\u56de\u306f\u3001\u305d\u306e\u5f85\u3061\u6642\u9593\u3092\u89e3\u6d88\u3059\u308b\u3079\u304f\u3001\u81ea\u52d5\u5316\u306e\u30b7\u30ca\u30ea\u30aa\u5b9f\u73fe\u3057\u3066\u898b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n
\u30b7\u30ca\u30ea\u30aa\u3068\u3057\u3066\u306f<\/p>\n
\u3068\u3044\u3063\u305f\u5185\u5bb9\u3067\u3059\u3002<\/p>\n
2\u30b9\u30c6\u30c3\u30d7\u3060\u3051\u3067\u3059\u304c\u3001\u4eee\u306b\u3044\u305a\u308c\u3082\u624b\u52d5\u3067\u884c\u3063\u3066\u3044\u305f\u5834\u5408\u306f\u3001<\/p>\n
\u30de\u30b7\u30f3\u30a4\u30e1\u30fc\u30b8\uff08AMI\uff09\u306e\u53d6\u5f97\u3092\u958b\u59cb\u3059\u308b
\n\u2192AMI\u306e\u4f5c\u6210\u5b8c\u4e86\u3092\u5f85\u3064\u3002\uff08\u9577\u3055\u306f\u3055\u307e\u3056\u307e\u3067\u6570\u5206\u3067\u306f\u7d42\u308f\u3089\u306a\u3044\u3053\u3068\u3082\u3042\u308b\uff09
\n\u2192\u6642\u3005\u300cAMI\u53d6\u5f97\u7d42\u308f\u3063\u305f\u304b\u306a\uff1f\u300d\u306a\u3069\u3092\u6c17\u306b\u3057\u306a\u304c\u3089\u3001\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u78ba\u8a8d\u3059\u308b\u3002
\n\u2192AMI\u53d6\u5f97\u304c\u7d42\u308f\u3063\u305f\u306e\u3092\u898b\u3066\u3001\u30d1\u30c3\u30c1\u9069\u7528\u306b\u53d6\u308a\u639b\u304b\u308b<\/p>\n
\u3068\u3044\u3046\u5177\u5408\u3067\u3001AMI\u53d6\u5f97\u306e\u5b8c\u4e86\u307e\u3067\u5f85\u305f\u3055\u308c\u307e\u3059\u3057\u3001\u30d1\u30c3\u30c1\u9069\u7528\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30aa\u30da\u30ec\u30fc\u30b7\u30e7\u30f3\u3067\u884c\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u72b6\u6cc1\u3067\u3042\u308c\u3070\u3001\u64cd\u4f5c\u30df\u30b9\u306b\u3088\u308b\u5371\u967a\u6027\u304c\u5c11\u306a\u304b\u3089\u305a\u5b58\u5728\u3057\u305f\u624b\u9806\u3068\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n
\u4eca\u56de\u306f\u3053\u308c\u3089\u306e\u81ea\u52d5\u5316\u3092\u3057\u3066\u3001\u958b\u59cb\u3057\u305f\u3089\u653e\u7f6e\u3067\u304d\u308b\u3001\u304b\u3064\u5b89\u5168\u306b\u5b9f\u884c\u3055\u308c\u308b\u4f53\u5236\u3092\u76ee\u6307\u3057\u307e\u3059\u3002<\/p>\n
\u307e\u305a\u306f\u4eca\u56de\u306e\u691c\u8a3c\u7528\u306bEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002
\n2018\u5e74\u306eAmazon Linux 2\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4f7f\u3063\u3066\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u30d1\u30c3\u30c1\u9069\u7528\u5bfe\u8c61\u304c\u591a\u304f\u542b\u307e\u308c\u305f\uff08\u30d1\u30c3\u30c1\u9069\u7528\u306e\u3084\u308a\u304c\u3044\u306e\u3042\u308b\uff1f\uff09\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002
\n\u307e\u305f\u3001\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30ed\u30fc\u30eb\u3082\u30a2\u30bf\u30c3\u30c1\u3057\u307e\u3059\u3002<\/p>\n
<\/a><\/p>\n \u3053\u306e\u30ed\u30fc\u30eb\u306b\u306f\u3053\u306eEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092Systems Manager\u3067\u306e\u7ba1\u7406\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e<\/p>\n \u3068CloudWatchLogs\u3067\u30d1\u30c3\u30c1\u9069\u7528\u6642\u306e\u30ed\u30b0\u8a18\u9332\u3092\u884c\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b<\/p>\n \u306e\u30dd\u30ea\u30b7\u30fc\u3092\u4ed8\u4e0e\u3057\u3066\u304a\u304d\u307e\u3059\u3002\uff08\u203b\u5b9f\u969b\u306e\u904b\u7528\u6642\u306b\u306f\u201dFullAccess\u201d\u3067\u306f\u306a\u304f\u3001\u53b3\u5bc6\u306a\u6700\u5c0f\u6a29\u9650\u3067\u4ed8\u4e0e\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n \u3055\u3066\u3001\u3053\u306e\u72b6\u614b\u3067\u30d1\u30c3\u30c1\u5bfe\u8c61\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb<\/p>\n \u671f\u5f85\u901a\u308a\u3068\u3066\u3082\u5927\u91cf\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u5bfe\u8c61\u304c\u51fa\u3066\u304d\u307e\u3057\u305f\uff01<\/p>\n \u3053\u308c\u3067EC2\u306e\u4f5c\u6210\u306f\u6e96\u5099\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n \u6b21\u306bSystems Manager Automation\u306e\u5b9f\u884c\u5185\u5bb9\u304c\u5b9a\u7fa9\u3055\u308c\u305f \u201cRunbook\u201d\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 <\/a><\/p>\n \u305d\u3057\u3066\u3001\u30a8\u30c7\u30a3\u30bf\u753b\u9762\u3092\u958b\u3044\u3066\u6b21\u306eyaml\u306e\u5185\u5bb9\u3092\u4fdd\u5b58<\/p>\n <\/a><\/p>\n \u3053\u308c\u3067Automation\u306e\u8a2d\u5b9a\u3082\u5b8c\u6210\u3067\u3059\u3002<\/p>\n Automation\u306f\u5b8c\u6210\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u3082\u3046\u5c11\u3057\u3060\u3051\u6e96\u5099\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4f5c\u6210\u753b\u9762\u3088\u308aSystems Manager\u30b5\u30fc\u30d3\u30b9\u7528\u306eIAM\u30ed\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059 \u3068\u3001\u305d\u308c\u306b\u30d7\u30e9\u30b9\u3057\u3066<\/p>\n \u306e\u30dd\u30ea\u30b7\u30fc\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002\uff08\u203bEC2\u306e\u90e8\u5206\u306f\u5b9f\u969b\u306e\u904b\u7528\u6642\u306b\u306f\u3088\u308a\u53b3\u5bc6\u306a\u6700\u5c0f\u6a29\u9650\u3067\u4ed8\u4e0e\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n <\/a> \u4e8b\u524d\u6e96\u5099\u306f\u6b21\u304c\u6700\u5f8c\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u305d\u306e\u30d1\u30c3\u30c1\u9069\u7528\u6642\u306b\u306f\u3001\u305d\u306eEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u9069\u7528\u3055\u308c\u308b\u30d1\u30c3\u30c1\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u306b\u6e96\u3058\u3066\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n \u7d30\u304b\u3044\u89e3\u8aac\u306f\u7701\u3044\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f \u201cMy-Baseline\u201d\u3068\u3044\u3046\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u3001\u30d1\u30c3\u30c1\u30b0\u30eb\u30fc\u30d7\u3092EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u3068\u3044\u3046\u8a2d\u5b9a\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n \u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u306e\u5185\u8a33\uff1a \u4ee5\u4e0a\u3067\u30d1\u30c3\u30c1\u9069\u7528\u6642\u306e\u52d5\u4f5c\u3082\u78ba\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n \u3067\u306f\u4ee5\u4e0a\u3092\u8e0f\u307e\u3048\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n \u5148\u307b\u3069\u5b8c\u6210\u3057\u305fAutomation\u306e\u753b\u9762\u304b\u3089\u300c\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u300d\u3092\u62bc\u4e0b <\/a> \u5165\u529b\u3092\u7d42\u3048\u305f\u3089\u300c\u5b9f\u884c\u300d\u3092\u62bc\u4e0b\u3057\u307e\u3059\u3002<\/p>\n \u5b9f\u884c\u3057\u305f\u3089\u6b21\u306e\u3088\u3046\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u3002 \u3055\u3066\u3001\u3053\u306e\u30b9\u30c6\u30c3\u30d71\u30fb2\u3067\u306f\u5f8c\u7d9a\u306e\u51e6\u7406\u3067\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b<\/p>\n \u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u306f\u3059\u3050\u7d42\u308f\u308a\u307e\u3059\u3002 <\/a> \u306e\u3088\u3046\u306a\u8868\u8a18\u3067AMI\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002 \u6700\u5f8c\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u30d1\u30c3\u30c1\u9069\u7528\u304c\u884c\u308f\u308c\u307e\u3059\u3002 \u305d\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u304b\u3089\u3082\u30d1\u30c3\u30c1\u9069\u7528\u72b6\u6cc1\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u3001<\/p>\n \u201cNo packages marked for update\u201d! \u5b9f\u884c\u307e\u3067\u306b\u3044\u304f\u3089\u304b\u6e96\u5099\u304c\u5fc5\u8981\u306a\u3082\u306e\u3067\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u3068\u5b9f\u884c\u7528\u30ed\u30fc\u30eb\u3092\u81ea\u7531\u306b\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u3042\u3068\u306f\u30d1\u30c3\u30c1\u9069\u7528\u307e\u3067\u884c\u3063\u3066\u304f\u308c\u308b\u4ed5\u7d44\u307f\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n AMI\u306e\u53d6\u5f97\u306f\u6642\u306b\u9577\u304f\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001\u305d\u306e\u9593\u306e\u300c\u4f5c\u6210\u7d42\u308f\u3063\u305f\u304b\u306a\uff1f\u300d\u306e\u78ba\u8a8d\u3092\u7e70\u308a\u8fd4\u3059\u5fc5\u8981\u304c\u306a\u304f\u306a\u308b\u3001\u5b8c\u4e86\u6b21\u7b2c\u30d1\u30c3\u30c1\u9069\u7528\u304c\u81ea\u52d5\u7684\u306b\u59cb\u307e\u308b\u3001\u3068\u3044\u3046\u306e\u306f\u624b\u9593\u306e\u524a\u6e1b\u306b\u5927\u304d\u304f\u8ca2\u732e\u3059\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\n
AmazonSSMManagedInstanceCore<\/code><\/li>\n<\/ul>\n
\n
CloudWatchLogsFullAccess<\/code><\/li>\n<\/ul>\n
$ sudo yum update\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\namzn2-core | 3.7 kB 00:00:00\nResolving Dependencies\n--> Running transaction check\n\n\uff08\u4e2d\u7565\uff09\n\nTransaction Summary\n========================================================================================================================================\nInstall 4 Packages (+14 Dependent packages)\nUpgrade 320 Packages\n\nTotal download size: 146 M\nIs this ok [y\/d\/N]:<\/code><\/pre>\n
\u4e8b\u524d\u6e96\u5099\uff1a Automation \u201cRunbook\u201d\u306e\u4f5c\u6210<\/h3>\n
\nSystems Manager\u306e\u300c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u300d\u306e\u753b\u9762\u304b\u3089\u4f5c\u6210\u3092\u9078\u3073\u307e\u3059\u3002<\/p>\ndescription: ''\nschemaVersion: '0.3'\nassumeRole: '{{ AutomationAssumeRole }}'\nparameters:\n InstanceId:\n type: String\n description: ' (Required) Target EC2 InstanceId'\n allowedPattern: '^i-[a-z0-9]{8,17}$'\n AutomationAssumeRole:\n type: String\n description: (Required) The ARN of the role that allows Automation to perform the actions on your behalf.\nmainSteps:\n - name: InstanceIdListed\n action: 'aws:executeScript'\n inputs:\n Runtime: python3.7\n Handler: script_handler\n Script: |-\n def script_handler(events, context):\n mylist =[]\n mylist.append(events["InstanceId"])\n return (mylist)\n InputPayload:\n InstanceId: '{{InstanceId}}'\n outputs:\n - Name: result\n Selector: $.Payload\n Type: StringList\n - name: GetInstanceName\n action: 'aws:executeScript'\n inputs:\n Runtime: python3.7\n Handler: script_handler\n Script: |\n import boto3\n\n def script_handler(events, context):\n instanceId = events["InstanceId"]\n ec2 = boto3.client('ec2')\n tags = ec2.describe_tags(\n Filters=[{'Name': 'resource-id', 'Values': [instanceId]}])['Tags']\n if not tags:\n return (instanceId)\n for tag in tags:\n if (tag['Key']) == "Name":\n result = tag['Value']\n return (result)\n InputPayload:\n InstanceId: '{{InstanceId}}'\n outputs:\n - Name: result\n Selector: $.Payload\n Type: String\n - name: CreateAMI\n action: 'aws:createImage'\n inputs:\n InstanceId: '{{InstanceId}}'\n ImageName: '{{GetInstanceName.result}}_{{global:DATE}}_{{automation:EXECUTION_ID}}'\n - name: RunPatchBaseline\n action: 'aws:runCommand'\n inputs:\n DocumentName: AWS-RunPatchBaseline\n InstanceIds: '{{InstanceIdListed.result}}'\n Parameters:\n Operation: Install\n SnapshotId: '{{automation:EXECUTION_ID}}'\n CloudWatchOutputConfig:\n CloudWatchOutputEnabled: true\n<\/code><\/pre>\n
\u4e8b\u524d\u6e96\u5099\uff1a Automation\u5b9f\u884c\u7528\u306eIAM\u30ed\u30fc\u30eb\u306e\u4f5c\u6210<\/h3>\n
\nAutomation\u306e\u30b9\u30c6\u30c3\u30d7\u306e\u4e2d\u306b\u306fPython\u306eboto3\u3092\u4f7f\u3063\u3066\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u60c5\u5831\u3092\u53d6\u5f97\uff08 describe_tags<\/code> \uff09\u3057\u3066\u3044\u308b\u7b87\u6240\u304c\u3042\u308a\u307e\u3059\u3002
\n\u305d\u306e\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u6a29\u9650\u304c\u8db3\u308a\u306a\u3044\u305f\u3081\u5225\u9014\u65b0\u8a2d\u3057\u3066\u305d\u308c\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n
\n<\/a>
\n\u305d\u3057\u3066\u3053\u306e\u30ed\u30fc\u30eb\u306b\u306f
\nAutomation\u5b9f\u884c\u306e\u305f\u3081\u306b\u6700\u4f4e\u9650\u5fc5\u8981\u306a<\/p>\n\n
AmazonSSMAutomationRole<\/code><\/li>\n<\/ul>\n
\n
AmazonEC2ReadOnlyAccess<\/code>\uff08\u3053\u306e\u6a29\u9650\u3092EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u60c5\u5831\u53d6\u5f97\u306e\u305f\u3081\u306b\u4f7f\u3046\uff09<\/li>\n<\/ul>\n
\n\u3053\u308c\u3067\u5b9f\u884c\u7528\u306eIAM\u30ed\u30fc\u30eb\u304c\u5b8c\u6210\u3067\u3059\u3002\u5b9f\u884c\u6642\u306b\u4f7f\u3046\u306e\u3067ARN\u3092\u63a7\u3048\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\u4e8b\u524d\u6e96\u5099\uff1a\u30d1\u30c3\u30c1\u30b0\u30eb\u30fc\u30d7\u306e\u8a2d\u5b9a<\/h3>\n
\n\u4eca\u56de\u306e\u81ea\u52d5\u5316\u306b\u304a\u3051\u308b\u30d1\u30c3\u30c1\u9069\u7528\u306f\u5177\u4f53\u7684\u306b\u306f RunPatchBaseline<\/code> \u3068\u3044\u3046RunCommand\u306e\u4ed5\u7d44\u307f\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u5b9f\u73fe\u3055\u308c\u307e\u3059\u3002<\/p>\n
\n\u305d\u3057\u3066<\/p>\n\n
\n<\/a>
\nEC2\u306e\u30bf\u30b0\u6307\u5b9a\u306b\u3088\u308a\u30d1\u30c3\u30c1\u30b0\u30eb\u30fc\u30d7\u6307\u5b9a\uff1a
\n<\/a><\/p>\n\u5404\u30b9\u30c6\u30c3\u30d7\u306e\u5b9f\u884c\u7d50\u679c\u3068\u89e3\u8aac<\/h2>\n
\u5fc5\u8981\u4e8b\u9805\u306e\u5165\u529b\u3068\u5b9f\u884c<\/h3>\n
\n<\/a>
\n\u6b21\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u3068\u201dAutomationAssumeRole\u201d\u306e\u5165\u529b\u304c\u6c42\u3081\u3089\u308c\u308b\u306e\u3067\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306eID\u3068\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fAutomation\u5b9f\u884c\u7528\u306e\u30ed\u30fc\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n
\n\u3069\u3061\u3089\u3082\u9078\u629e\u5f0f\u306e\u30d5\u30a9\u30fc\u30e0\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u5165\u529b\u304c\u4fbf\u5229\u3067\u3059\u3057\u3001\u4e0d\u6b63\u306a\u5024\u306f\u5165\u308c\u3089\u308c\u306a\u3044\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\u30b9\u30c6\u30c3\u30d71\u30fb2<\/h3>\n
\n<\/a><\/p>\n\n
\n\u5b8c\u4e86\u3057\u305f\u3089\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u9032\u307f\u307e\u3059\u3002<\/p>\n\u30b9\u30c6\u30c3\u30d73<\/h3>\n
\n\u3053\u3061\u3089\u3067\u306f\u5165\u529b\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u3092\u5bfe\u8c61\u306b\u30de\u30b7\u30f3\u30a4\u30e1\u30fc\u30b8\uff08AMI\uff09\u306e\u4f5c\u6210\u3092\u884c\u3044\u307e\u3059\u3002
\n\u305d\u306e\u969b\u306b\u306f\u30b9\u30c6\u30c3\u30d73\u3067\u306f\u4e0a\u8a18\u3067\u53d6\u5f97\u3055\u308c\u305f\u201dName\u201d\u30bf\u30b0\uff08\u3082\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\uff09\u3092\u4f7f\u3063\u3066
\n<Name>_<\u5b9f\u884c\u5e74\u6708\u65e5>_<\u5b9f\u884c\u6642\u306eID><\/code><\/p>\n
\n\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u304c\u52d5\u3044\u3066\u3044\u308b\u3068\u304d\u306bAMI\u306e\u753b\u9762\u3092\u958b\u304f\u3068\u3001\u78ba\u304b\u306bAMI\u306e\u4f5c\u6210\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002
\n<\/a>
\n\u3053\u308c\u3082\u5b8c\u4e86\u3057\u305f\u3089\u81ea\u52d5\u7684\u306b\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u9032\u307f\u307e\u3059\u3002<\/p>\n\u30b9\u30c6\u30c3\u30d74<\/h3>\n
\n<\/a>
\n\u3053\u306e\u969b\u306e\u8a73\u7d30\u306a\u7d50\u679c\u306f\u201dRun Command\u201d\u306e\u5c65\u6b74\u304b\u3089\u3082\u898b\u308b\u3053\u3068\u3067\u304d\u3001\u5e0c\u671b\u3057\u305fEC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306e\u30d1\u30c3\u30c1\u9069\u7528\u304c\u884c\u308f\u308c\u3066\u305f\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002
\n\uff08\u8a73\u7d30\u306a\u5b9f\u884c\u30ed\u30b0\u306fCloudWatchLogs\u306b\u8a18\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u4e07\u304c\u4e00\u306e\u969b\u306e\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8\u3082\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\uff09
\n<\/a><\/p>\n[ec2-user@ip-172-xx-xx-xxx ~]$ sudo yum update\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\namzn2-core | 3.7 kB 00:00:00\nNo packages marked for update\n[ec2-user@ip-172-xx-xx-xxx ~]$<\/code><\/pre>\n
\n\u5168\u3066\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u7121\u4e8b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002
\n\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u6642\u306b\u306f\u518d\u8d77\u52d5\u3082\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u308b\u306e\u3067\u3001\u5168\u3066\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\u307e\u3068\u3081<\/h2>\n
\n\u5024\u306e\u5165\u529b\u304c\u9078\u629e\u5f0f\u306e\u30d5\u30a9\u30fc\u30e0\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u30aa\u30da\u30ec\u30fc\u30b7\u30e7\u30f3\u304c\u5168\u3066\u81ea\u52d5\u5316\u3055\u308c\u308b\u306e\u3067\u30df\u30b9\u3092\u3059\u308b\u53ef\u80fd\u6027\u3092\u6392\u3057\u3066\u3088\u308a\u5b89\u5168\u306a\u904b\u7528\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n