{"id":5149,"date":"2020-09-26T19:55:41","date_gmt":"2020-09-26T10:55:41","guid":{"rendered":"https:\/\/kumapress.com\/?p=5149"},"modified":"2020-09-26T20:08:14","modified_gmt":"2020-09-26T11:08:14","slug":"aws-lightsail%e3%82%a4%e3%83%b3%e3%82%b9%e3%82%bf%e3%83%b3%e3%82%b9%e3%81%a8s3%e3%82%92%e3%81%a4%e3%81%aa%e3%81%90","status":"publish","type":"post","link":"https:\/\/kumapress.com\/?p=5149","title":{"rendered":"AWS Lightsail\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068S3\u3092\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u3064\u306a\u3050"},"content":{"rendered":"\n<p><span style=\"font-size: 14pt;\">Lightsail \u306b\u306f\u30b9\u30c8\u30ec\u30fc\u30b8\u3082\u3042\u308b\u3093\u3067\u3059\u304c\u3001EC2\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u30c7\u30fc\u30bf\u5171\u6709\u3082\u3057\u305f\u3044\u306a\u3041\u3068\u601d\u3044\u3001S3\u3068\u306e\u63a5\u7d9a\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">EC2\u306e\u3068\u304d\u307f\u305f\u3044\u306bVPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u4f5c\u6210\u3057\u3066\u3044\u3001VPC\u30d4\u30a2\u63a5\u7d9a\u3057\u3061\u3083\u3048\u3070OK\u304b\u3068\u8003\u3048\u3066\u3044\u305f\u3093\u3067\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b&#8221;S3\u306b\u306f\u4e0d\u8981\u3067\u3059&#8221;\u3063\u3066\u8a18\u8f09\u304c\u3002\u3002\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><a href=\"https:\/\/lightsail.aws.amazon.com\/ls\/docs\/ja_jp\/articles\/lightsail-how-to-set-up-vpc-peering-with-aws-resources\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">Amazon Lightsail \u306e\u5916\u90e8\u306e AWS \u30ea\u30bd\u30fc\u30b9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b Amazon VPC \u30d4\u30a2\u63a5\u7d9a\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b<\/span><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400; font-size: 14pt;\">\u201c\u4e00\u90e8\u306e AWS \u30ea\u30bd\u30fc\u30b9 (Amazon S3\u3001Amazon CloudFront\u3001Amazon DynamoDB \u306a\u3069) \u3067\u306f\u3001VPC \u30d4\u30a2\u63a5\u7d9a\u3092\u6709\u52b9\u306b\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u201d<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u203bS3\u3067\u3059\u304c\u3001&#8221;\u30d1\u30d6\u30ea\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u3092\u3059\u3079\u3066\u30d6\u30ed\u30c3\u30af&#8221;\u306f\u30aa\u30f3\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">VPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059<\/h2>\n\n\n\n<p><span style=\"font-size: 14pt;\">\u4eca\u56de\u306f\u3001\u540d\u79f0\u3092&#8221;Lightsail2-vpc&#8221;\u3068\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5153 size-full\" src=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/7696cd584375755e4b780f8b36975527.png\" alt=\"\" width=\"1045\" height=\"416\" srcset=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/7696cd584375755e4b780f8b36975527.png 1045w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/7696cd584375755e4b780f8b36975527-300x119.png 300w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/7696cd584375755e4b780f8b36975527-1024x408.png 1024w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/7696cd584375755e4b780f8b36975527-768x306.png 768w\" sizes=\"auto, (max-width: 1045px) 100vw, 1045px\" \/><\/p>\n<p><span style=\"font-size: 14pt;\">\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u3001S3\u3078\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u60c5\u5831\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5154\" src=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/6149c3393d4c62868ebda5819070e9d5.png\" alt=\"\" width=\"930\" height=\"358\" srcset=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/6149c3393d4c62868ebda5819070e9d5.png 930w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/6149c3393d4c62868ebda5819070e9d5-300x115.png 300w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/6149c3393d4c62868ebda5819070e9d5-768x296.png 768w\" sizes=\"auto, (max-width: 930px) 100vw, 930px\" \/><\/p>\n<p><span style=\"font-size: 14pt;\">\u3055\u3066\u3001\u30b3\u30ec\u3067\u30a2\u30af\u30bb\u30b9\u3092\u3057\u3066\u307f\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">$ aws s3 ls s3:\/\/ku-bucket01<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u3064\u306a\u304c\u3063\u305f\u3053\u3068\u306f\u3064\u306a\u304c\u3063\u305f\u3088\u3046\u3067\u3001\u6b21\u306f\u6a29\u9650\u306e\u8a2d\u5b9a\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IAM\u306e\u4f5c\u6210\u3092\u884c\u3044\u307e\u3059\u3002<\/h2>\n\n\n\n<p><span style=\"font-size: 14pt;\">EC2\u3060\u3068\u300c\u30a2\u30af\u30b7\u30e7\u30f3\u2192\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u8a2d\u5b9a\u2192IAM\u30ed\u30fc\u30eb\u306e\u5909\u66f4\u300d\u304b\u3089\u64cd\u4f5c\u3092\u3059\u308b\u306e\u3067\u3059\u304c\u3001Lightsail\u306b\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u305d\u306e\u304b\u308f\u308a\u4e0b\u8a18\u306e\u624b\u9806\u3067\u884c\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">IAM\u30e6\u30fc\u30b6\u30fc\u3068\u30dd\u30ea\u30b7\u30fc\u3092\u4f5c\u6210\u3057\u3001[\u30a2\u30af\u30bb\u30b9\u30ad\u30fc ID] \u3068 [\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc] \u3092AWS CLI \u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u30fb<a href=\"https:\/\/console.aws.amazon.com\/iam\/home?region=ap-northeast-1#\/home\" target=\"_blank\" rel=\"noopener noreferrer\">IAM\u30b3\u30f3\u30bd\u30fc\u30eb<\/a>\u3092\u958b\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u30fb\u30e6\u30fc\u30b6\u30fc\u2192\u300c\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u300d<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5158\" src=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/610d6a1f2f22835f0d8f9a3ce5535542.png\" alt=\"\" width=\"707\" height=\"291\" srcset=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/610d6a1f2f22835f0d8f9a3ce5535542.png 707w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/610d6a1f2f22835f0d8f9a3ce5535542-300x123.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/p>\n<p><span style=\"font-size: 14pt;\">\u30e6\u30fc\u30b6\u30fc\u540d\u306f&#8221;Lightsail2-iam-pc-user&#8221;\u3068\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u30a2\u30af\u30bb\u30b9\u306e\u7a2e\u985e\u306f\u3001&#8221;\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308b\u30a2\u30af\u30bb\u30b9&#8221;\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u30fb\u300c\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u300d\u2192\u300c\u65e2\u5b58\u306e\u30dd\u30ea\u30b7\u30fc\u3092\u76f4\u63a5\u30a2\u30bf\u30c3\u30c1\u300d<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5160\" src=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/d51c02ca41c910960e4a7d96941a7b7e.png\" alt=\"\" width=\"747\" height=\"312\" srcset=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/d51c02ca41c910960e4a7d96941a7b7e.png 747w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/d51c02ca41c910960e4a7d96941a7b7e-300x125.png 300w\" sizes=\"auto, (max-width: 747px) 100vw, 747px\" \/><\/p>\n<p><span style=\"font-size: 14pt;\">\u30bf\u30b0\u3084\u3089\u3044\u304f\u3064\u304b\u306e\u8a2d\u5b9a\u6709\u308a\u3002\u3002\u3002<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5161\" src=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/bd54727f139141d2e86e874a640ef8b5.png\" alt=\"\" width=\"639\" height=\"367\" srcset=\"https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/bd54727f139141d2e86e874a640ef8b5.png 639w, https:\/\/kumapress.com\/wp\/wp-content\/uploads\/2020\/09\/bd54727f139141d2e86e874a640ef8b5-300x172.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p><span style=\"font-weight: 400; font-size: 14pt;\">\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210\u3092\u3059\u308b\u3068\u3001\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u3068\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">CSV\u30d5\u30a1\u30a4\u30eb\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u4e00\u3064\u3060\u3051\u306a\u3093\u3067\u30e1\u30e2\u30e1\u30e2(^^)<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AWS CLI\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/h2>\n\n\n\n<p><span style=\"font-size: 14pt;\">\u30a2\u30af\u30bb\u30b9\u30ad\u30fc\u3068\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u30ad\u30fc\u3092AWS CLI\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >$ aws configure\nAWS Access Key ID [None]: ****************DUM\nAWS Secret Access Key [None]: ****************************sSc\nDefault region name [None]: ap-northeast-1\nDefault output format [None]: json\n\n$ aws configure list\n      Name                    Value             Type    Location\n      ----                    -----             ----    --------\n   profile                &lt;not set&gt;             None    None\naccess_key     ****************3DUM shared-credentials-file\nsecret_key     ****************qsSc shared-credentials-file\n    region           ap-northeast-1      config-file    ~\/.aws\/config<\/pre><\/div>\n\n\n\n<p><span style=\"font-size: 14pt;\">$ aws s3 cp test.txt s3:\/\/km-bucket011<\/span><br><span style=\"font-size: 14pt;\">upload: .\/test.txt to s3:\/\/km-bucket011\/test.txt<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">$ aws s3 ls s3:\/\/km-bucket011<\/span><br><span style=\"font-size: 14pt;\">2020-09-26 08:29:36 5 test.txt<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\u7121\u4e8b\u3064\u306a\u304c\u3063\u3066\u304f\u308c\u307e\u3057\u305f\uff01\uff01\uff01<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u304a\u307e\u3051(^^)<\/h2>\n\n\n\n<p><span style=\"font-size: 14pt;\">\u3053\u3093\u306a\u8a18\u4e8b\u3082\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><a href=\"https:\/\/lightsail.aws.amazon.com\/ls\/docs\/ja_jp\/articles\/amazon-lightsail-connecting-wordpress-to-amazon-s3\" target=\"_blank\" rel=\"noopener noreferrer\">\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb: Amazon Lightsail \u306e WordPress \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092 Amazon S3 \u30d0\u30b1\u30c3\u30c8\u306b\u63a5\u7d9a\u3059\u308b<\/a><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Lightsail \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<aside class=\"row veu_insertAds after\"><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 2\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"5379270693\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 1\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"7353370294\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><\/aside>","protected":false},"excerpt":{"rendered":"<p>Lightsail \u306b\u306f\u30b9\u30c8\u30ec\u30fc\u30b8\u3082\u3042\u308b\u3093\u3067\u3059\u304c\u3001EC2\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u30c7\u30fc\u30bf\u5171\u6709\u3082\u3057\u305f\u3044\u306a\u3041\u3068\u601d\u3044\u3001S3\u3068\u306e\u63a5\u7d9a\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u307e\u3057\u305f\u3002 EC2\u306e\u3068\u304d\u307f\u305f\u3044\u306bVPC\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u4f5c\u6210\u3057\u3066\u3044\u3001VPC\u30d4\u30a2\u63a5\u7d9a\u3057\u3061\u3083\u3048\u3070OK\u304b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5038,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[126],"tags":[171,172,176,175],"class_list":["post-5149","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-memo","tag-aws","tag-lightsail","tag-s3","tag-vpc"],"_links":{"self":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/5149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5149"}],"version-history":[{"count":14,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/5149\/revisions"}],"predecessor-version":[{"id":5168,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/5149\/revisions\/5168"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/media\/5038"}],"wp:attachment":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}