{"id":8970,"date":"2016-11-30T02:15:51","date_gmt":"2016-11-29T17:15:51","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=8970"},"modified":"2016-11-30T02:18:07","modified_gmt":"2016-11-29T17:18:07","slug":"boto3%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%80%81ec2%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9%e3%82%92%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/boto3%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%80%81ec2%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9%e3%82%92%e8%b5%b7%e5%8b%95%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f\/","title":{"rendered":"Boto3\u3092\u4f7f\u3063\u3066\u3001EC2\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u307f\u305f"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p>\u3044\u3061\u3044\u3061AWS\u306e\u30de\u30cd\u30b3\u30f3\u306b\u5165\u3063\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3068\u3044\u3046\u6d41\u308c\u3092\u81a0\u7740\u3057\u305f\u3044\u3002<br \/>\nBoto3\u3092\u4f7f\u7528\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u8d77\u52d5\u3092SDK\u3092\u4f7f\u7528\u3057\u3066\u884c\u3046\u3082\u306e\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h1>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h1>\n<pre>\n# -*- coding: utf-8 -*-\n\nimport boto3\nfrom boto3.session import Session\n\nec2 = boto3.client('ec2')\nInstanceId = '\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID'\n\ndef ec2_start():\n  response = ec2.start_instances(\n    InstanceIds=[\n      InstanceId\n    ]\n  )\n\nif __name__ == \"__main__\":\n  ec2_start()\n<\/pre>\n<p><a href=\"https:\/\/github.com\/handa3\/study\/blob\/master\/aws\/ec2\/start.py\">https:\/\/github.com\/handa3\/study\/blob\/master\/aws\/ec2\/start.py<\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\u306f\u9069\u5b9c\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u3055\u3044\u3054\u306b<\/h1>\n<p>\u3053\u308c\u3067\u30ed\u30fc\u30ab\u30ebPC\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\uff01<br \/>\nGit\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u672c\u4eba\u306b\u8a31\u53ef\u3092\u5f97\u3066\u63b2\u8f09\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u3044\u3061\u3044\u3061AWS\u306e\u30de\u30cd\u30b3\u30f3\u306b\u5165\u3063\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3068\u3044\u3046\u6d41\u308c\u3092\u81a0\u7740\u3057\u305f\u3044\u3002 Boto3\u3092\u4f7f\u7528\u3057\u3066\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u8d77\u52d5\u3092SDK\u3092\u4f7f\u7528\u3057\u3066\u884c\u3046\u3082\u306e\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 # -*- coding: ut&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8964,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"8970","footnotes":""},"categories":[20,19,9],"tags":[183,65],"class_list":{"0":"post-8970","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"category-19","9":"category-dev","10":"tag-boto","11":"tag-python","12":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/8970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=8970"}],"version-history":[{"count":4,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/8970\/revisions"}],"predecessor-version":[{"id":8975,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/8970\/revisions\/8975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/8964"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=8970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=8970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=8970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}