Book Image

AWS Tools for PowerShell 6

By : Ramesh Waghmare
Book Image

AWS Tools for PowerShell 6

By: Ramesh Waghmare

Overview of this book

AWS Tools for PowerShell 6 shows you exactly how to automate all the aspects of AWS. You can take advantage of the amazing power of the cloud, yet add powerful scripts and mechanisms to perform common tasks faster than ever before. This book expands on the Amazon documentation with real-world, useful examples and production-ready scripts to automate all the aspects of your new cloud platform. It will cover topics such as managing Windows with PowerShell, setting up security services, administering database services, and deploying and managing networking. You will also explore advanced topics such as PowerShell authoring techniques, and configuring and managing storage and content delivery. By the end of this book, you will be able to use Amazon Web Services to automate and manage Windows servers. You will also have gained a good understanding of automating the AWS infrastructure using simple coding.
Table of Contents (17 chapters)

Downloading folders and objects from the S3 bucket

With the increasing popularity of S3 and its simplicity, almost every organization started using S3 for their object store. So, you need to know how you can upload and download S3 objects from the S3 bucket. We have already seen this in the previous section on uploading or writing objects/folders to S3. Let's review the download-related cmdlet. The Read-S3Object cmdlet lets you download an S3 object optionally, including sub-objects, to a local file or folder location on your local computer.

To download the Tax file from the bucket myfirstpowershellbucket and to save it as local-Tax.txt locally, use the following command. If local-Tax.txt is already present, the operation will overwrite the file:

PS C:\>Read-S3Object -BucketName myfirstpowershellbucket -Key Tax -File local-Tax.txt

To download the complete folder Books...