Pluralsight- adding cidr range to vpc

0

Im getting an error when trying to input this command. I'm following along on Pluralsight and it looks like its supposed to be straight forward but...well....take a look:

PS C:\Users\kooko\Downloads\advanced-networking-on-aws-master\advanced-networking-on-aws-master\m3> vpc_id=$(aws ec2 describe-vpcs --filters Name="tag:Name",Values="globo-primary" >>

--query 'Vpcs[0].VpcId' --output text) vpc_id=$(aws ec2 describe-vpcs --filters Name="tag:Name",Values="globo-primary"
--query 'Vpcs[0].VpcId' --output text) : The term 'vpc_id=$(aws ec2 describe-vpcs --filters Name="tag:Name",Values="globo-primary"
--query 'Vpcs[0].VpcId' --output text)' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • vpc_id=$(aws ec2 describe-vpcs --filters Name="tag:Name",Values="glob ...
  •   + CategoryInfo          : ObjectNotFound: (vpc_id=$(aws ec... --output text):String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
2 Answers
0

The error CommandNotFoundException is telling you that that it can't find the command vpc_id. Thats because it looks like you are trying to run a script as a normal command.

This looks like Powershell, firstly make sure you have the AWS Tools for Powershell installed (https://docs.aws.amazon.com/powershell/index.html)

Then try running the script in the PowerShell ISE (https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise?view=powershell-7.2)

rianbk
answered 2 years ago
0

dddasdfsdfdsf

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions