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 Antworten
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
beantwortet vor 2 Jahren
0

dddasdfsdfdsf

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen