AWSinAction / code

Code of Amazon Web Services in Action, 1st edition
https://www.manning.com/books/amazon-web-services-in-action
MIT License
269 stars 162 forks source link

Listing 5.1 doesn't work in Windows PowerShell without changes #6

Closed danielpapst closed 8 years ago

danielpapst commented 8 years ago

You indicate that you're using the command line by prepending "$ " to the commands.

For instance: $ aws cloudformation describe-stacks --stack-name vpn --query Stacks[0].Outputs --output text

For the initialization of variables you need to prepend a $ to the variable identifier.

Won't work: $ VpcId=$(aws ec2 describe-vpcs --query Vpcs[0].VpcId --output text)

Will work: $ $VpcId=$(aws ec2 describe-vpcs --query Vpcs[0].VpcId --output text)

andreaswittig commented 8 years ago

Thanks for reporting these issues when using our examples with PowerShell. Will add this to our errata.

andreaswittig commented 8 years ago

Had a deeper look. As stated in the introduction we are only covering the AWS CLI via Shell/Bash in our book. Might be an option to add an appendix for PowerShell with the next revision. Depending on demand. Easiest way to follow our examples might be to launch an EC2 instance (Amazon Linux) and execute the command there.