Can I view the primary CIDR for my VPC in AWS from the terminal?

0 votes

Can I view the primary CIDR for my VPC in AWS from the terminal?

May 16 in AWS by Tushar
47 views

1 answer to this question.

0 votes

Hey @Tushar, you can use the describe vpc command for this purpose:

aws ec2 describe-vpcs --vpc-id vpc-1a2b3c4d

You'll see a similar output:

{
    "Vpcs": [
        {
            "VpcId": "vpc-1a2b3c4d", 
            "InstanceTenancy": "default", 
            "Tags": [
                {
                    "Value": "MyVPC", 
                    "Key": "Name"
                }
            ], 
            "CidrBlockAssociations": [
                {
                    "AssociationId": "vpc-cidr-assoc-3781aa5e", 
                    "CidrBlock": "10.0.0.0/16", 
                    "CidrBlockState": {
                        "State": "associated"
                    }
                }, 
                {
                    "AssociationId": "vpc-cidr-assoc-0280ab6b", 
                    "CidrBlock": "10.2.0.0/16", 
                    "CidrBlockState": {
                        "State": "associated"
                    }
                }
            ], 
            "State": "available", 
            "DhcpOptionsId": "dopt-e0fe0e88", 
            "CidrBlock": "10.0.0.0/16", 
            "IsDefault": false
        }
    ]
}
answered May 16 by Renuka

Related Questions In AWS

0 votes
1 answer

How can I just increase the size of my root disk on AWS EC2 for use with Elastic Beanstalk?

This can be done using the following ...READ MORE

answered Nov 12, 2018 in AWS by Archana
• 5,560 points
234 views
0 votes
1 answer
+1 vote
0 answers

How can i start my AWS - glue job from my java application

i want to start and stop my ...READ MORE

Jul 15 in AWS by Dhanesh
75 views
0 votes
1 answer

how to access AWS S3 from Lambda in VPC

With boto3, the S3 urls are virtual by default, ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 56,900 points
2,087 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer