{"id":12091,"date":"2023-06-03T11:16:15","date_gmt":"2023-06-03T02:16:15","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=12091"},"modified":"2023-06-04T08:16:04","modified_gmt":"2023-06-03T23:16:04","slug":"aws%e3%81%a7vpc%e3%82%92%e4%bd%9c%e6%88%90%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88aws-cli%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/12091","title":{"rendered":"AWS\u306e\u30ea\u30fc\u30b8\u30e7\u30f3\u306b\u5bfe\u3057\u3066VPC\u3092\u4f5c\u6210\uff0f\u524a\u9664\uff0f\u8868\u793a\u3059\u308b\uff01\uff08AWS CLI\uff09"},"content":{"rendered":"<p>AWS CLI\u3067VPC\u3092\u4f5c\u6210\u3001\u524a\u9664\u3001\u8868\u793a\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>VPC\u3068\u306f\uff1f<\/h2>\n<p>VPC\u306f\u3001AWS\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u306e\u57fa\u672c\u3068\u306a\u308b\u69cb\u6210\u5358\u4f4d\u3067\u3001VPC\u306f\u30ea\u30fc\u30b8\u30e7\u30f3\u306b\u5bfe\u3057\u3066\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>VPC\u3092\u4f5c\u6210\u3059\u308b\uff08aws ec2 create-vpc\uff09<\/h2>\n<p>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u3066\u3001VPC\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u3001\u300c10.111.0.0\/16\u300d\u3092\u6307\u5b9a\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 create-vpc --cidr-block 10.111.0.0\/16\r\n{\r\n    &quot;Vpc&quot;: {\r\n        &quot;CidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n        &quot;DhcpOptionsId&quot;: &quot;dopt-9a3cddfc&quot;,\r\n        &quot;State&quot;: &quot;pending&quot;,\r\n        &quot;VpcId&quot;: &quot;vpc-097f68a04255466f9&quot;,\r\n        &quot;OwnerId&quot;: &quot;XXXXXXXXXXXX&quot;,\r\n        &quot;InstanceTenancy&quot;: &quot;default&quot;,\r\n        &quot;Ipv6CidrBlockAssociationSet&quot;: &#x5B;],\r\n        &quot;CidrBlockAssociationSet&quot;: &#x5B;\r\n            {\r\n                &quot;AssociationId&quot;: &quot;vpc-cidr-assoc-0053ff876d038995c&quot;,\r\n                &quot;CidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n                &quot;CidrBlockState&quot;: {\r\n                    &quot;State&quot;: &quot;associated&quot;\r\n                }\r\n            }\r\n        ],\r\n        &quot;IsDefault&quot;: false\r\n    }\r\n}\r\n<\/pre>\n<h2>VPC\u3092\u8868\u793a\u3059\u308b\uff01\uff08aws ec2 describe-vpcs\uff09<\/h2>\n<p>\u4f5c\u6210\u3057\u305fVPC\u3092\u300caws ec2 describe-vpcs\u300d\u30b3\u30de\u30f3\u30c9\u3067\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 describe-vpcs --vpc-ids vpc-097f68a04255466f9\r\n{\r\n    &quot;Vpcs&quot;: &#x5B;\r\n        {\r\n            &quot;CidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n            &quot;DhcpOptionsId&quot;: &quot;dopt-9a3cddfc&quot;,\r\n            &quot;State&quot;: &quot;available&quot;,\r\n            &quot;VpcId&quot;: &quot;vpc-097f68a04255466f9&quot;,\r\n            &quot;OwnerId&quot;: &quot;XXXXXXXXXXXX&quot;,\r\n            &quot;InstanceTenancy&quot;: &quot;default&quot;,\r\n            &quot;CidrBlockAssociationSet&quot;: &#x5B;\r\n                {\r\n                    &quot;AssociationId&quot;: &quot;vpc-cidr-assoc-0053ff876d038995c&quot;,\r\n                    &quot;CidrBlock&quot;: &quot;10.111.0.0\/16&quot;,\r\n                    &quot;CidrBlockState&quot;: {\r\n                        &quot;State&quot;: &quot;associated&quot;\r\n                    }\r\n                }\r\n            ],\r\n            &quot;IsDefault&quot;: false\r\n        }\r\n    ]\r\n}\r\n<\/pre>\n<h2>VPC\u306b\u30bf\u30b0\u3092\u3064\u3051\u308b\uff01<\/h2>\n<p>VPC\u306b\u30bf\u30b0\u3092\u3064\u3051\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 create-tags --resources vpc-097f68a04255466f9 --tags Key=Name,Value=vpc01\r\n<\/pre>\n<h2>VPC\u3092\u524a\u9664\u3059\u308b\uff01\uff08aws ec2 delete-vpc\uff09<\/h2>\n<p>VPC\u306e\u524a\u9664\u306f\u3001\u300caws ec2 delete-vpc\u300d\u30b3\u30de\u30f3\u30c9\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 delete-vpc --vpc-id vpc-097f68a04255466f9\r\n<\/pre>\n<h2>VPC\u3092\u524a\u9664\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\uff01\uff08aws ec2 describe-vpcs\uff09<\/h2>\n<p>VPC\u3092\u524a\u9664\u3057\u305f\u3053\u3068\u3092\u300caws ec2 describe-vpcs\u300d\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ aws ec2 describe-vpcs --vpc-ids vpc-097f68a04255466f9\r\n\r\nAn error occurred (InvalidVpcID.NotFound) when calling the DescribeVpcs operation: The vpc ID 'vpc-097f68a04255466f9' does not exist\r\n<\/pre>\n<h2>VPC\u306e\u6599\u91d1\u306f\uff1f<\/h2>\n<p>VPC\u306f\u4f5c\u6210\u3059\u308b\u3060\u3051\u306a\u3089\u3070\u3001\u7121\u6599\u3067\u3059\u3002VPC\u3068\u3057\u3066\u306e\u6599\u91d1\u306f\u7121\u6599\u3067\u3001VPC\u5185\u306b\u69d8\u3005\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001\u4f5c\u6210\u3057\u305f\u30ea\u30bd\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u6599\u91d1\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>VPC\u306f\u4f5c\u6210\u3059\u308b\u3060\u3051\u306a\u3089\u7121\u6599\u306a\u306e\u3067\u3001AWS\u306e\u74b0\u5883\u69cb\u7bc9\u3068\u3057\u3066\u3001\u5b89\u5fc3\u3057\u3066\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\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>AWS CLI\u3067VPC\u3092\u4f5c\u6210\u3001\u524a\u9664\u3001\u8868\u793a\u3057\u307e\u3059\u3002<\/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,373,372],"class_list":["post-12091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network-aws","tag-aws","tag-aws-vpc","tag-vpc"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12091","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=12091"}],"version-history":[{"count":22,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12091\/revisions"}],"predecessor-version":[{"id":12192,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/12091\/revisions\/12192"}],"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=12091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=12091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=12091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}