AWS Classroom Series – 02/Apr/2021

Creating VPC using AWS CLI

  • Lets create a IAM user to configure aws cli
aws configure
Enter access key , secret key and region(us-west-2)
  • To create IAM user Refer Here
  • AWS CLI are the commands to create resources in AWS by using Commands
  • To find command
    • approach 1: google Preview
    • approach 2: aws cli commands are in the form of aws service action args
      • Refer Here for the aws cli reference
      • VPC belongs to a service ec2 Refer Here
      • Now find the commands for vpc Preview
  • AWS CLI has two kinds of arguments
    • required arguments
    • optional arguments
  • Since we want to create vpc Refer Here Preview Preview
  • Lets create vpc Preview
  • Now lets make a note of vpc id.
  • Other approach is to query for vpc id and in aws generally most of the query commands will be in form of describe-<resource> Refer Here for describe vpcs
  • We can query the cli outputs Preview
  • To do that first we need to understand
  • We will have one session on JMES Path
  • Exercise: Write aws cli to
    • create a vpc with 4 subnets (you can manually copy id)
    • Attach the internet gateway to vpc
    • Make two subnets public and two subnet private.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube