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, 2019 in AWS by Tushar
741 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, 2019 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,640 points
3,265 views
0 votes
1 answer
0 votes
1 answer

How do I view CloudWatch metrics for my Load Balancer using the console?

Follow these steps: Open the Amazon EC2 console On ...READ MORE

answered May 17, 2019 in AWS by Tanishq
749 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
• 58,020 points
10,122 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP