{"id":12193,"date":"2023-06-04T08:49:43","date_gmt":"2023-06-03T23:49:43","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=12193"},"modified":"2023-06-05T06:21:24","modified_gmt":"2023-06-04T21:21:24","slug":"vpc%e3%81%ab%e5%af%be%e3%81%97%e3%81%a6%e3%83%91%e3%83%96%e3%83%aa%e3%83%83%e3%82%af%e3%82%b5%e3%83%96%e3%83%8d%e3%83%83%e3%83%88%e7%94%a8%e3%81%ae%e3%83%ab%e3%83%bc%e3%83%88%e3%83%86%e3%83%bc","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/12193","title":{"rendered":"VPC\u306b\u5bfe\u3057\u3066\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8\u7528\u306e\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\uff0f\u524a\u9664\uff0f\u8868\u793a\u3059\u308b\uff01\uff08AWS CLI\uff09"},"content":{"rendered":"<p>VPC\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\uff0f\u524a\u9664\uff0f\u8868\u793a\u3059\u308b\uff01\uff08AWS CLI\uff09<br \/>\n<!--more--><\/p>\n<h2>VPC\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>VPC\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 create-route-table --vpc-id vpc-04627361e47a52f6e\r\n{\r\n    &quot;RouteTable&quot;: {\r\n        &quot;Associations&quot;: &#x5B;],\r\n        &quot;PropagatingVgws&quot;: &#x5B;],\r\n        &quot;RouteTableId&quot;: &quot;rtb-02f56e55c88151fe3&quot;,\r\n        &quot;Routes&quot;: &#x5B;\r\n            {\r\n                &quot;DestinationCidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n                &quot;GatewayId&quot;: &quot;local&quot;,\r\n                &quot;Origin&quot;: &quot;CreateRouteTable&quot;,\r\n                &quot;State&quot;: &quot;active&quot;\r\n            }\r\n        ],\r\n        &quot;Tags&quot;: &#x5B;],\r\n        &quot;VpcId&quot;: &quot;vpc-04627361e47a52f6e&quot;,\r\n        &quot;OwnerId&quot;: &quot;XXXXXXXXXXXX&quot;\r\n    }\r\n}\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u30bf\u30b0\u3092\u3064\u3051\u308b\uff01<\/h2>\n<p>\u4f5c\u6210\u3057\u305f\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u30bf\u30b0\u3092\u3064\u3051\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 create-tags --resources rtb-02f56e55c88151fe3 --tags Key=Name,Value=vpc-rtb01\r\n<\/pre>\n<h2>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3078\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u60c5\u5831\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3078\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u60c5\u5831\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 create-route --route-table-id rtb-02f56e55c88151fe3 --destination-cidr-block 0.0.0.0\/0 --gateway-id igw-0633a3ef9219c3832\r\n{\r\n    &quot;Return&quot;: true\r\n}\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u5272\u308a\u5f53\u3066\u308b\uff01<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u304c\u30d1\u30d6\u30ea\u30c3\u30af\u30b5\u30d6\u30cd\u30c3\u30c8\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 associate-route-table --subnet-id subnet-0f7670ced2223978a --route-table-id rtb-02f56e55c88151fe3\r\n{\r\n    &quot;AssociationId&quot;: &quot;rtbassoc-04874e8b25818fecc&quot;,\r\n    &quot;AssociationState&quot;: {\r\n        &quot;State&quot;: &quot;associated&quot;\r\n    }\r\n}\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 describe-route-tables --route-table-ids rtb-02f56e55c88151fe3\r\n{\r\n    &quot;RouteTables&quot;: &#x5B;\r\n        {\r\n            &quot;Associations&quot;: &#x5B;\r\n                {\r\n                    &quot;Main&quot;: false,\r\n                    &quot;RouteTableAssociationId&quot;: &quot;rtbassoc-04874e8b25818fecc&quot;,\r\n                    &quot;RouteTableId&quot;: &quot;rtb-02f56e55c88151fe3&quot;,\r\n                    &quot;SubnetId&quot;: &quot;subnet-0f7670ced2223978a&quot;,\r\n                    &quot;AssociationState&quot;: {\r\n                        &quot;State&quot;: &quot;associated&quot;\r\n                    }\r\n                }\r\n            ],\r\n            &quot;PropagatingVgws&quot;: &#x5B;],\r\n            &quot;RouteTableId&quot;: &quot;rtb-02f56e55c88151fe3&quot;,\r\n            &quot;Routes&quot;: &#x5B;\r\n                {\r\n                    &quot;DestinationCidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n                    &quot;GatewayId&quot;: &quot;local&quot;,\r\n                    &quot;Origin&quot;: &quot;CreateRouteTable&quot;,\r\n                    &quot;State&quot;: &quot;active&quot;\r\n                },\r\n                {\r\n                    &quot;DestinationCidrBlock&quot;: &quot;0.0.0.0\/0&quot;,\r\n                    &quot;GatewayId&quot;: &quot;igw-0633a3ef9219c3832&quot;,\r\n                    &quot;Origin&quot;: &quot;CreateRoute&quot;,\r\n                    &quot;State&quot;: &quot;active&quot;\r\n                }\r\n            ],\r\n            &quot;Tags&quot;: &#x5B;\r\n                {\r\n                    &quot;Key&quot;: &quot;Name&quot;,\r\n                    &quot;Value&quot;: &quot;vpc-rtb01&quot;\r\n                }\r\n            ],\r\n            &quot;VpcId&quot;: &quot;vpc-04627361e47a52f6e&quot;,\r\n            &quot;OwnerId&quot;: &quot;XXXXXXXXXXXX&quot;\r\n        }\r\n    ]\r\n}\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30d6\u30cd\u30c3\u30c8\u3078\u306e\u5272\u5f53\u3092\u89e3\u9664\u3059\u308b\uff01<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30d6\u30cd\u30c3\u30c8\u3078\u306e\u5272\u5f53\u3092\u89e3\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 disassociate-route-table --association-id rtbassoc-04874e8b25818fecc\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u524a\u9664\u3059\u308b\uff01<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 delete-route-table --route-table-id rtb-02f56e55c88151fe3\r\n<\/pre>\n<h2>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u304c\u524a\u9664\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u304c\u524a\u9664\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 describe-route-tables --route-table-ids rtb-02f56e55c88151fe3\r\n\r\nAn error occurred (InvalidRouteTableID.NotFound) when calling the DescribeRouteTables operation: The routeTable ID 'rtb-02f56e55c88151fe3' does not exist\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306f\u3001\u30b5\u30d6\u30cd\u30c3\u30c8\u306b\u306b\u5272\u308a\u5f53\u3066\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002\u524a\u9664\u3059\u308b\u5834\u5408\u306f\u3001\u5272\u308a\u5f53\u3066\u306e\u89e3\u9664\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/12156\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/eyecatch_aws_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\uff01<\/div><div class=\"substr\">AWS\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/12112\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u3092\u64cd\u4f5c\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/eyecatch_aws_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u3092\u64cd\u4f5c\u3059\u308b\uff01<\/div><div class=\"substr\">AWS\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8161\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/eyecatch_aws_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011AWS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">AWS\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VPC\u306b\u5bfe\u3057\u3066\u30eb\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\uff0f\u524a\u9664\uff0f\u8868\u793a\u3059\u308b\uff01\uff08AWS CLI\uff09<\/p>\n","protected":false},"author":1,"featured_media":8172,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[376],"tags":[288,353,382,381],"class_list":["post-12193","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network-aws","tag-aws","tag-aws-cli","tag-382","tag-381"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=12193"}],"version-history":[{"count":6,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12193\/revisions"}],"predecessor-version":[{"id":12199,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12193\/revisions\/12199"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/8172"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=12193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=12193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=12193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}