AWS Tools for Windows PowerShell. User Guide Version 1.0

Transcription

1 AWS Tools for Windows PowerShell User Guide

2 AWS Tools for Windows PowerShell: User Guide Copyright 2014 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront, Cloudfront, CloudTrail, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic Compute Cloud, Amazon Glacier, Kinesis, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift, Amazon Route 53, Amazon S3, Amazon VPC. In addition, Amazon.com graphics, logos, page headers, button icons, scripts, and service names are trademarks, or trade dress of Amazon in the U.S. and/or other countries. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

4 How to Use this Guide What are the AWS Tools for Windows PowerShell? The AWS Tools for Windows PowerShell are a set of PowerShell cmdlets that are built on top of the functionality exposed by the AWS SDK for.net. The AWS Tools for Windows PowerShell enable you to script operations on your AWS resources from the PowerShell command line. Although the cmdlets are implemented using the service clients and methods from the SDK, the cmdlets provide an idiomatic PowerShell experience for specifying parameters and handling results. For example, the cmdlets for the PowerShell Tools support PowerShell pipelining that is, you can pipeline PowerShell objects both into and out of the cmdlets. The AWS Tools for Windows PowerShell are flexible in how they enable you to handle credentials including support for the AWS Identity and Access Management (IAM) infrastructure; you can use the tools with IAM user credentials, temporary security tokens, and IAM roles. The AWS Tools for Windows PowerShell support the same set of services and regions as supported by the SDK. How to Use this Guide The guide is divided into the following major sections: Setting up the AWS Tools for Windows PowerShell (p. 2) This section explains how to install the AWS Tools for Windows PowerShell. It also covers how to sign up for AWS if you don't already have an account. (An AWS account is required in order to use the PowerShell Tools.) Getting Started with the AWS Tools for Windows PowerShell (p. 8) This section describes the fundamentals of using the tools, such as specifying credentials and regions, finding cmdlets for a particular service, and using aliases for cmdlets. Using the AWS Tools for Windows PowerShell (p. 19) This section includes information about using the AWS Tools for Windows PowerShell to perform common AWS tasks. 1

5 Getting Setup Setting up the AWS Tools for Windows PowerShell Setting up the AWS Tools for Windows Power- Shell Topics Prerequisites (p. 2) Download and Install the AWS Tools for Windows PowerShell (p. 3) Enable Script Execution (p. 3) Configure a PowerShell Console to Use the AWS Tools for Windows PowerShell (p. 4) Versioning (p. 5) Prerequisites To use the AWS Tools for Windows PowerShell, you must have an AWS account. If you do not yet have an AWS account, see AWS Account and Access Keys (p. 6) for instructions on how to sign up. To use the AWS Tools for Windows PowerShell, your installed system must meet the following prerequisites: Microsoft Windows XP or later Windows PowerShell 2.0 or later Windows 7 and Windows Server 2008 R2 come with Windows PowerShell 2.0 installed. Windows 8 and Windows Server 2012 come with Windows PowerShell 3.0 installed. For earlier versions of Windows, such as Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008, you can get PowerShell 2.0 by installing the Windows Management Framework Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0) 2

6 Download and Install the PowerShell Tools Download and Install the AWS Tools for Windows PowerShell The AWS Tools for Windows PowerShell is one of the optional components that you can install using the AWS Tools for Windows installer.msi. Download the installer by navigating to the following URL and clicking AWS Tools for Windows. The installer for the PowerShell Tools installs the most recent version of the AWS SDK for.net. If you have Microsoft Visual Studio installed, the installer can also install the AWS Toolkit for Visual Studio. All Windows Amazon Machine Images (AMIs) have the AWS Tools for Windows PowerShell pre-installed. For an example of using the PowerShell Tools on an Amazon EC2 instance, see the following sample in the AWS SDK for.net. New Project... AWS Compute and Networking AWS EC2 Sample Enable Script Execution In order to load the AWS Tools for Windows PowerShell module, you need to enable PowerShell script execution if you have not already done so. To enable script execution, use the Set-ExecutionPolicy cmdlet to set a policy of RemoteSigned. By default, PowerShell uses a policy of Restricted. For more information about execution policies, see Microsoft's TechNet documentation. To enable script execution 1. Administrator privileges are required to set the execution policy. If you are not logged in as a user with administrator privileges, you need to open a PowerShell prompt as Administrator: Click Start and then click All Programs; click Accessories, and then click Windows PowerShell; now rightclick Windows PowerShell, and select Run as administrator from the context menu. 2. At the command prompt, type: Set-ExecutionPolicy RemoteSigned Note On a 64-bit system, you will also need to perform these steps for the 32-bit version of PowerShell, Windows PowerShell (x86). If you do not have the execution policy set correctly, PowerShell generates the following message. File C:\Users\teslan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details. At line:1 char:2 +. <<<< 'C:\Users\teslan\Documents\WindowsPowerShell\Microsoft.PowerShell_pro file.ps1' + CategoryInfo : NotSpecified: (:) [], PSSecurityException + FullyQualifiedErrorId : RuntimeException The installer for the PowerShell Tools updates the PSModulePath to include the location of the directory that contains the AWSPowerShell module. As a result, if you are using PowerShell version 3, the 3

7 Configure a PowerShell Console to Use the Tools AWSPowerShell module is loaded automatically whenever you run one of the AWS cmdlets. This enables you to use the AWS cmdlets interactively even if the execution policy on your system is set to disallow script execution. Because the PSModulePath includes the location of the AWS module's directory, the Get-Module - ListAvailable cmdlet shows the module. PS C:\> Get-Module -ListAvailable ModuleType Name ExportedCommands Manifest AppLocker {} Manifest BitsTransfer {} Manifest PSDiagnostics {} Manifest TroubleshootingPack {} Manifest AWSPowerShell {Update-EBApplicationVersion, Set-DPStatus, Remove-IAMGroupPol... Configure a PowerShell Console to Use the AWS Tools for Windows PowerShell The installer creates a Start Menu group called, Amazon Web Services, which contains a shortcut called Windows PowerShell for AWS. For PowerShell version 2, this shortcut automatically imports the AWSPowerShell module and then runs the Initialize-AWSDefaults cmdlet. For PowerShell version 3, the AWSPowerShell module is loaded automatically whenever you run an AWS cmdlet. So, for PowerShell version 3 installations, the shortcut created by the installer only runs the Initialize-AWS- Defaults cmdlet. For more information about Initialize-AWSDefaults, see Using AWS Credentials (p. 8). The installer also creates an additional shortcut called AWS Tools for Windows, which opens a visual display of AWS resources for Windows developers. If you use PowerShell version 3 or if you only use the shortcut installed by the installer, you do not need to configure a PowerShell window to use the AWS Tools for Windows PowerShell. However, if, for example, you use PowerShell version 2 with a specially configured PowerShell window and want to add support for the tools, you need to load the AWS module yourself. How to Load the AWS Tools for Windows PowerShell Module (PowerShell version 2) To load the PowerShell Tools module into your current session 1. Open a PowerShell prompt and type the following command: PS C:> import-module "C:\Program Files (x86)\aws Tools\PowerShell\AWSPower Shell\AWSPowerShell.psd1" 2. To verify that the module was loaded, type the following command: PS C:> Get-Module 4

8 Versioning If you see an entry in the list named AWSPowerShell (see the following), then the PowerShell Tools module was loaded successfully. ModuleType Name ExportedCommands Binary AWSPowerShell {Update-EBApplicationVersion, Set- S3ACL... Load AWS CLI for PowerShell Module into Every Session (PowerShell version 2) To automatically load the AWSPowerShell module every time you start a PowerShell session, you can add it to your PowerShell profile. Note, however, that adding commands to your PowerShell profile can slow down the speed at which a PowerShell session starts up. The PowerShell $profile variable contains the full path to the text file that contains your PowerShell profile. This variable is available only in a PowerShell session; it is not one of the regular Windows environment variables. To view the value of this variable, use echo. echo $profile C:\Users\kncubq\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 You can edit this file with any text editor, such as notepad.exe. notepad $profile You may need to create both the profile directory and the profile itself if they do not already exist. Versioning New versions of the PowerShell Tools will release periodically to support new AWS services and features. To tell what version of the tools you have installed, use the following command: PS C:\> Get-AWSPowerShellVersion AWS Tools for Windows PowerShell.0.9 Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. Amazon Web Services SDK for.net Version Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. This software includes third party software subject to the following copyrights: - Logging from log4net, Apache License [http://logging.apache.org/log4net/license.html] You can also specify the -ListServices option to see a list of which AWS services are supported in the current version of the tools. 5

10 See Also To get your access key ID and secret access key Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. If you don't have access keys, you can create them by using the AWS Management Console. Note To create access keys, you must have permissions to perform the required IAM actions. For more information, see Granting IAM User Permission to Manage Password Policy and Credentials in Using IAM. 1. Open the IAM console. 2. From the navigation menu, click Users. 3. Select your IAM user name. 4. Click User Actions, and then click Manage Access Keys. 5. Click Create Access Key. Your keys will look something like this: Access key ID example: AKIAIOSFODNN7EXAMPLE Secret access key example: wjalrxutnfemi/k7mdeng/bpxrficyexamplekey 6. Click Download Credentials, and store the keys in a secure location. Your secret key will no longer be available through the AWS Management Console; you will have the only copy. Keep it confidential in order to protect your account, and never it. Do not share it outside your organization, even if an inquiry appears to come from AWS or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key. Related topics What Is IAM? in Using IAM AWS Security Credentials in AWS General Reference See Also Getting Started with the AWS Tools for Windows PowerShell (p. 8) Using the AWS Tools for Windows PowerShell (p. 19) 7

11 AWS Credentials Getting Started with the AWS Tools for Windows PowerShell This section describes fundamentals of using the PowerShell Tools. For example, it explains how to specify which credentials and region the tools should use when interacting with AWS. This section also provides guidance on how to use standard PowerShell cmdlets such as Get-Command to discover AWS cmdlets. Topics Using AWS Credentials (p. 8) Specifying AWS Regions (p. 11) Cmdlet Discovery and Aliases (p. 13) Pipelining and $AWSHistory (p. 15) Using AWS Credentials Each PowerShell Tools command must include a set of AWS credentials, which are used to cryptographically sign the corresponding web service request.you can specify credentials per-command, per-session, or for all sessions. To avoid accidentally exposing your credentials, you should not put literal credentials in a command. Instead, you can create a profile for each set of credentials that you want to use, and store the profile in either of two credentials stores. You then reference the appropriate profile by name in your command, and PowerShell Tools retrieves the associated credentials. For a general discussion of how to safely manage AWS credentials, see Best Practices for Managing AWS Access Keys. Topics Note If you do not yet have an AWS account, you will need one in order to obtain credentials and use the PowerShell Tools. For information about how to sign up for an account, see AWS Account and Access Keys (p. 6). Managing Profiles (p. 9) Specifying Credentials (p. 10) Credentials Search Order (p. 11) 8

12 Managing Profiles Managing Profiles PowerShell Tools can use either of two credentials stores. The SDK Store, which encrypts your credentials and stores them under your home folder. The SDK Store can also be used by the AWS SDK for.net and AWS Toolkit for Visual Studio. The credentials file, which is also located under your home folder, but stores credentials as plaintext. The credentials file can also be used by all AWS SDKs and the AWS Command Line Interface. This topic describes how to use PowerShell Tools to manage your profiles in the SDK Store. You can also manage the SDK Store by using thetoolkit for Visual Studio or programmatically by using the SDK for.net. For directions on how to manage profiles in the credentials file, see general/latest/gr/aws-access-keys-best-practices.html Add a new profile To add a new profile to the SDK Store, call Set-AWSCredentials as follows: Set-AWSCredentials -AccessKey AKIAIOSFODNN7EXAMPLE -SecretKey wjalrxutn FEMI/K7MDENG/bPxRfiCYEXAMPLEKEY -StoreAs MyProfileName The parameters are: -AccessKey The access key. -SecretKey The secret key. -StoreAs The profile name, which must be unique. To specify the default profile, set the profile name to default. Update a profile The SDK Store must be maintained manually. If you later change credentials on the service for example, by using the IAM Console running a command with the locally stored credentials will fail with the following error message: The AWS Access Key Id you provided does not exist in our records. You can update a profile by repeating theset-awscredentials command for the profile, and passing it the new access and secret keys. List profiles You can check the current list of names as follows: Get-AWSCredentials -ListStoredCredentials Remove a profile To remove a profile, use the following command: Clear-AWSCredentials -StoredCredentials MyProfileName The -StoredCredentials parameter specifies the profile name. 9

13 Specifying Credentials Specifying Credentials There are several ways to specify credentials. The preferred approach is to use a profile rather than incorporating literal credentials into your command line. The PowerShell Tools locates the profile using a search order that is described in Credentials Search Order (p. 11). This section describes the most common ways to specify a profile. Note You use the -ProfileName parameter to specify a profile. This parameter is equivalent to the -StoredCredentials parameter used by earlier PowerShell Tools releases. For backward compatibility, -StoredCredentials is still supported. Default profile (recommended) Use Initialize-AWSDefaults to specify a default profile for every PowerShell session. PS C:\> Initialize-AWSDefaults -ProfileName MyProfileName -Region us-west- 2 Note The default credentials are included in the SDK Store under the default profile name. The command overwrites any existing profile with that name. Session profile Use Set-AWSCredentials to specify a default profile for a particular session. This profile overrides any default profile for the duration of the session. PS C:> Set-AWSCredentials -ProfileName MyProfileName The -ProfileName parameter specifies the profile name. Note In versions of the PowerShell Tools prior to v1.1, the above command did not work correctly, and would overwrite the profile specified by MyProfileName. We recommend using a more recent version of the PowerShell Tools. Command profile Use the -ProfileName parameter to specify a profile for a particular command. This profile override any default or session profiles. For example: PS C:> Get-EC2Instance -ProfileName MyProfileName Tip When you specify a default or session profile, you can also include a -Region parameter to specify a default or session region. For more information, see Specifying AWS Regions (p. 11). The following example specifies a default profile and region. PS C:\> Initialize-AWSDefaults -ProfileName MyProfileName -Region uswest-2 By default, the credentials file is assumed to be in it's default location under the user's home folder (C:\users\username\.aws\credentials). To specify a credentials file in an arbitrary location, include a -ProfilesLocation parameter, set to the credentials file path. For example, the following example specifies a non-default credentials file for a particular command. 10

14 Credentials Search Order PS C:> Get-EC2Instance -ProfileName MyProfileName -ProfileLocation C:\aws_ser vice_credentials\credentials Credentials Search Order When you run a command, PowerShell Tools searches for credentials in the following order and uses the first available set. 1. Use literal credentials that are embedded in the command line. We strongly recommend using profiles rather than putting literal credentials in your command lines. 2. Use a specified profile name or profile location. If you specify only a profile name, use a specified profile from the SDK Store and, if that does not exist, the specified profile from the credentials file in the default location. If you specify only a profile location, use the default profile from that credentials file. If you specify a name and a location, use the specified profile from that credentials file. If the specified profile or location is not found, the command throws an exception. Search proceeds to the following steps only if you have not specified a profile or location. 3. Use credentials specified by the -Credentials parameter. 4. Use a session profile. 5. Use a default profile, in the following order: a. The default profile in the SDK store. b. The default profile in the credentials file. c. Use the AWS PS Default profile in the SDK Store. 6. If you are using running the command on an Amazon EC2 instance that is configured for an IAM role, use EC2 instance credentials stored in an instance profile. For more information about using IAM roles for Amazon EC2 Instances, go to the AWS Developer Guide for.net. If this search fails to locate the specified credentials, the command throws an exception. Specifying AWS Regions There are two ways to specify the AWS Region to use when running AWS CLI commands, the -Region common parameter, or the Set-AWSDefaultRegion command. Most AWS cmdlets will fail if you do not specify a region. The exceptions are: Amazon S3 (p. 31), Amazon SES, and AWS Identity and Access Management (IAM) (p. 36). In the absence of a specified region, Amazon S3 uses US Standard and Amazon SES uses US East 1. Amazon SES and IAM are services that do not require a region to be specified. To specify the region for a single AWS command Add the -Region parameter to your command, such as: PS C:> Get-EC2Image -Region us-west-1 11

15 AWS Regions To set a default region for all AWS CLI commands in the session From the PowerShell command prompt, type the following command: PS C:> Set-DefaultAWSRegion us-west-1 Note This setting will last only for the current session. To apply to all of your PowerShell sessions, you can add this command to your PowerShell profile as you did for the import-module command. To view the current default region for all AWS CLI commands From the PowerShell command prompt, type the following command: PS C:> Get-DefaultAWSRegion SystemName Name IsShellDefault us-west-1 US West (N. California) True To clear the current default region for all AWS CLI commands From the PowerShell command prompt, type the following command: PS C:> Clear-DefaultAWSRegion To view a list of all available AWS regions From the PowerShell command prompt, type the following command. Note that the third column identifies which region is the default for your current session. PS C:> Get-AWSRegion SystemName Name IsShellDefault us-east-1 US East (Virginia) False us-west-1 US West (N. California) True us-west-2 US West (Oregon) False eu-west-1 EU West (Ireland) False eu-central-1 EU Central (Frankfurt) False ap-northeast-1 Asia Pacific (Tokyo) False ap-southeast-1 Asia Pacific (Singapore) False ap-southeast-2 Asia Pacific (Sydney) False sa-east-1 South America (Sao Paulo) False us-gov-west-1 US GovCloud West (Oregon) False 12

17 Cmdlet Naming and Aliases Cmdlet Naming and Aliases The cmdlets provided by the PowerShell Tools for a given service correspond approximately to the methods provided by the SDK for that service. However, because of PowerShell's naming conventions, the name of a cmdlet may be somewhat different than the name of the corresponding method. For example, the Get-EC2Instances cmdlet performs a similar function to the Amazon EC2 DescribeInstances method. In other cases, the cmdlet name may be similar to a method name, but it may actually perform a different function. For example, the Amazon S3 GetObject method retrieves an Amazon S3 object. However, the Get-S3Object cmdlet returns information about an Amazon S3 object rather than the object itself. PS C:> Get-S3Object -BucketName text-content -Key text-object Key : text-object.txt BucketName : text-content LastModified : Mon, 27 Aug :39:34 GMT ETag : "f738612c5e842b39819c6d8fc4eb5b9b" Size : Owner : Amazon.S3.Model.Owner StorageClass : STANDARD To retrieve the object with the PowerShell Tools, use the Read-S3Object cmdlet. PS C:> Read-S3Object -BucketName text-content -Key text-object.txt -file c:\tmp\text-object-download.text Mode LastWriteTime Length Name a--- 11/5/2012 7:29 PM text-object-download.text Note The cmdlet help for an AWS cmdlet provides the name of the SDK API that corresponds to the cmdlet. For more information about the standard PowerShell verbs and their expected meanings, go to the Windows DevCenter. All AWS cmdlets that use the Remove verb, and the Stop-EC2Instance cmdlet when used with the -Terminate switch, now prompt for confirmation before proceeding. To bypass confirmation, use the -Force switch. The AWS cmdlets do not support the -WhatIf switch. Aliases The setup program for the PowerShell Tools installs an aliases file that contains aliases for many of the tools cmdlets.you may find these aliases to be more intuitive than the cmdlet names. For example, aliases are provided that are prefixed with the service name rather than a PowerShell verb and followed by an SDK method name. An example is the EC2-DescribeInstances alias. Other aliases use verbs that, although they do not follow standard PowerShell conventions, may be more descriptive of the actual operation. For example, the alias file maps the alias Get-S3Content to the cmdlet Read-S3Object. PS C:>Set-Alias -Name Get-S3Content -Value Read-S3Object 14

18 Pipelining and $AWSHistory The aliases file is located in the AWS Tools for Windows PowerShell installation directory. To load the aliases into your environment, "dot-source" the file. PS C:>. c:\program Files (x86)\aws Tools\PowerShell\AWSPowershell\AWSAliases.ps1 Pipelining and $AWSHistory For service calls that return collections, the objects within the collection are now always enumerated to the pipeline. Result objects that contain additional fields beyond the collection and which are not paging control fields have these fields added as Note properties for the calls. These Note properties are logged in the new $AWSHistory session variable, should you need to access this data. The $AWSHistory variable is described in the next section. Note In versions of the PowerShell Tools prior to v1.1, the collection object itself was emitted, which required the use of foreach {$_.getenumerator()} to continue pipelining. Examples Return a collection of Amazon EC2 machine images (AMIs) across all regions. Get-AWSRegion % { Get-EC2Image -Owner self -Region $_ } Stop all Amazon EC2 instances in the current default region. Get-EC2Instance Stop-EC2Instance Because collections enumerate to the pipeline, the output from a given cmdlet might be $null, a single object, or a collection. If it is a collection, you can use the.count property to determine the size of the collection. However, the.count property is not present when only a single object is emitted. If your script needs to determine, in a consistent way, how many objects were emitted, use the new EmittedObjectsCount property of the last command value in $AWSHistory. $AWSHistory To better support pipelining, output from AWS cmdlets is no longer reshaped to include the service (SDK) response and result instances as Note properties on the emitted collection object. Instead, for those calls that emit a single collection as output, the collection is now enumerated to the PowerShell pipeline as described in previously. This means that the SDK response/result data cannot exist in the pipe as there is no containing collection object to which it can be attached. Although most users probably won't need this data, it can be useful for diagnostic purposes as you can see exactly what was sent to and received from the underlying AWS service call(s) made by the cmdlet. Starting with version 1.1, this data and more is now available in a new shell variable named $AWSHistory. This variable maintains a record of AWS cmdlet invocations and for each, the service responses that were received. Optionally, this history can be configured to also record the service requests that each cmdlet made. Additional useful data such as the overall execution time of the cmdlet can also be obtained from each entry. Each entry in the $AWSHistory.Commands list is of type AWSCmdletHistory. This type has the following useful members: 15

19 $AWSHistory CmdletName Name of the cmdlet. CmdletStart DateTime that the cmdlet was initialized by the shell. CmdletEnd DateTime that the cmdlet finished all processing. Requests If request recording is enabled, list of last service requests. Responses List of last service responses received. LastServiceResponse Helper to return the most recent service response. LastServiceRequest Helper to return the most recent service response, if available. Note that the $AWSHistory variable is not created until an AWS cmdlet making a service call is used. It evaluates to $null until that point. Note Earlier versions of the PowerShell Tools emitted data related to services responses as Note properties on the returned object. These are now found on the response entries recorded for each invocation in the list. Set-AWSHistoryConfiguration A given cmdlet invocation can hold zero or more service request and response entries. To limit memory impact the $AWSHistory list keeps a record of only the last 5 cmdlet executions by default and for each, the last 5 service responses (and if enabled, last 5 service requests). These default limits can be changed using the new Set-AWSHistoryConfiguration cmdlet. It allows you to both control the size of the list and whether service requests are also logged: Set-AWSHistoryConfiguration -MaxCmdletHistory <value> -MaxServiceCallHistory <value> -RecordServiceRequests The -MaxCmdletHistory parameter sets the maximum number of cmdlets that can be tracked at any time. A value of 0 turns off recording of AWS cmdlet activity. The -MaxServiceCallHistory parameter sets the maximum number of service responses (and/or requests) that are tracked for each cmdlet. The -RecordServiceRequests parameter, if specified, turns on tracking of service requests for each cmdlet. All parameters are optional. If run with no parameters, Set-AWSHistoryConfiguration simply turns off any prior request recording, leaving the current list sizes unchanged. To clear all entries in the current history list, use the new Clear-AWSHistory cmdlet. $AWSHistory Examples Enumerate the details of the AWS cmdlets that are being held in the list to the pipeline. PS C:\> $AWSHistory.Commands Access the details of the last AWS cmdlet that was run: 16

20 $AWSHistory PS C:\> $AWSHistory.LastCommand Access the details of the last service response received by the last AWS cmdlet that was run. If an AWS cmdlet is paging output, it may make multiple service calls to obtain either all data or the maximum amount of data (determined by parameters on the cmdlet). PS C:\> $AWSHistory.LastServiceResponse Access the details of the last request made (again, a cmdlet may make more than one request if it is paging on the user's behalf). Yields $null unless service request tracing is enabled. PS C:\> $AWSHistory.LastServiceRequest Automatic Page-to-Completion for Operations that Return Multiple Pages For service APIs that impose a default maximum object return count for a given call or that support pageable result sets, all cmdlets "page-to-completion" by default; the cmdlet makes as many calls as necessary on your behalf to return the complete data set to the pipeline. In the following example, which uses Get-S3Object, the $c variable contains S3Object instances for every key in the bucket test, potentially a very large data set. $c = Get-S3Object -BucketName test If you want to retain control of the amount of data returned, you can continue to use parameters on the individual cmdlets (e.g. MaxKeys on Get-S3Object) or you can explicitly handle paging yourself by using a combination of paging parameters on the cmdlets, and data placed in the $AWSHistory variable to get the service's next token data. The following example uses the MaxKeys parameter to limit the number of S3Object instances returned to no more than the first 500 found in the bucket. $c = Get-S3Object -BucketName test -MaxKeys 500 To know if more data was available but not returned, use the $AWSHistory session variable entry that recorded the service calls made by the cmdlet. If the following expression evaluates to $true, you can find the next marker for the next set of results using $AWSHistory.LastServiceResponse.NextMarker. $AWSHistory.LastServiceResponse -ne $null && $AWSHistory.LastServiceResponse.Is Truncated To manually control paging with Get-S3Object, use a combination of the MaxKeys and Marker parameters for the cmdlet and the IsTruncated/NextMarker notes on the last recorded response. In the following example, the variable $c contains up to a maximum of 500 S3Object instances for the next 500 objects that are found in the bucket after the start of the specified key prefix marker. 17

Getting Started with AWS Hosting a Static Website Getting Started with AWS: Hosting a Static Website Copyright 2015 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following are

Using Amazon EMR and Hunk to explore, analyze and visualize machine data Machine data can take many forms and comes from a variety of sources; system logs, application logs, service and system metrics,

Using ArcGIS for Server in the Amazon Cloud Randall Williams, Esri Subrat Bora, Esri Esri UC 2014 Technical Workshop Agenda What is ArcGIS for Server on Amazon Web Services Sounds good! How much does it

Using The Hortonworks Virtual Sandbox Powered By Apache Hadoop This work by Hortonworks, Inc. is licensed under a Creative Commons Attribution- ShareAlike3.0 Unported License. Legal Notice Copyright 2012

Getting Started with AWS Computing Basics for Linux Getting Started with AWS: Computing Basics for Linux Copyright 2014 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following

David Moses January 2014 Paper on Cloud Computing I Background on Tools and Technologies in Amazon Web Services (AWS) In this paper I will highlight the technologies from the AWS cloud which enable you

unisys Unisys Stealth(cloud) for Amazon Web Services Deployment Guide Release 1.0 January 2016 8205 5658-001 NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information

Online Backup Guide for the Amazon Cloud: How to Setup your Online Backup Service using Vembu StoreGrid Backup Virtual Appliance on the Amazon Cloud Here is a step-by-step set of instructions to get your

19.10.11 Amazon Elastic Beanstalk A Short History of AWS Amazon started as an ECommerce startup Original architecture was restructured to be more scalable and easier to maintain Competitive pressure for

Thing Big: How to Scale Your Own Internet of Things Walter'Pernstecher'-'pernstec@amazon.de' Dr.'Markus'Schmidberger'-'schmidbe@amazon.de' Internet of Things is the network of physical objects or "things"

Passwordstate Password Discovery, Reset and Validation Requirements This document and the information controlled therein is the property of Click Studios. It must not be reproduced in whole/part, or otherwise

Continuous Version 1.0 Copyright 2013, 2014 Amazon Web Services, Inc. and its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without prior written

Web Application Firewall Getting Started Guide August 3, 2015 Copyright 2014-2015 by Qualys, Inc. All Rights Reserved. Qualys and the Qualys logo are registered trademarks of Qualys, Inc. All other trademarks

Informatica Cloud & Redshift Getting Started User Guide 2014 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording

vrealize Automation 6.2.3 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions

Interworks Interworks Cloud Platform Installation Guide Published: March, 2014 This document contains information proprietary to Interworks and its receipt or possession does not convey any rights to reproduce,

Renderbot Tutorial Thanks for choosing to render your Blender projects in the cloud using Renderbot. This guide will introduce Amazon AWS, walk you through the setup process, and help you render your first

vrealize Operations Management Pack for AWS Installation and Configuration Guide 2.0 This document supports the version of each product listed and supports all subsequent versions until the document is

Dell SupportAssist Version 2.0 for Dell OpenManage Essentials Quick Start Guide Notes, Cautions, and Warnings NOTE: A NOTE indicates important information that helps you make better use of your computer.