简体   繁体   English

通过CLI工具的AWS EC2默认VPC访问

[英]AWS EC2 Default VPC access from CLI Tools

I've created an AWS account for testing purposes on EC2 instances, so i've got access on the AWS EC2 console and started an instance then i've customise it to suit my needs then i created a snapshot (Private AMI). 我已经创建了一个AWS账户用于在EC2实例上进行测试,因此我可以在AWS EC2控制台上进行访问并启动一个实例,然后根据需要对其进行自定义,然后创建一个快照(私有AMI)。

Then I installed the CLI Tools to launch it with a command line, but my default VPC wasn't the same that the one on the AWS EC2 Console, so i can't access any of my instances or my personnal AMIs, i've looked for changing it but no way. 然后,我安装了CLI工具以通过命令行启动它,但是我的默认VPC与AWS EC2控制台上的默认VPC不同,因此我无法访问任何实例或个人AMI,寻找改变它,但是没有办法。

EC2 Console from the web browser : Default VPC : vpc-9bc325fe Web浏览器上的EC2控制台 :默认VPC:vpc-9bc325fe

On the command prompt : 在命令提示符下:

$ ec2-describe-vpcs VPC vpc-384db15d available 172.31.0.0/16 dopt-667b6f04 default true $ ec2-describe-vpcs VPC vpc-384db15d可用172.31.0.0/16 dopt-667b6f04默认true

Any one have an idea how can i switch from vpcs or if there's another way to coordinate ? 任何人都有一个主意,我该如何从vpc切换,或者是否有另一种协调方式?

检查您在CLI和控制台上使用的是同一区域,因为VPC是按区域划分的,这可能是CLI和Web控制台之间存在差异的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM