Nexial Automation

Test Automation Platform for everyone!

X

aws.s3

S3, or Simple Storage Service, is a cloud-based storage service provided by Amazon AWS. One can utilize such service to manage files and content in the cloud. Nexial supports the use of S3 via various automation capabilities (below) such as move, copy, delete, list, etc.

Connection Setup

Similar to other command collections in Nexial, the commands of this command type utilize a profile-based approach to connect to the target AWS services. A profile is a collection of data variables that share the same prefix. In this case, below are the data variables that make up an AWS connectivity profile:

data variable value note
<profile>.aws.accessKey The access key valid for the target AWS service For more information, consult AWS online documentation
<profile>.aws.secretKey The secret key valid for the target AWS service More information available on AWS online documentation
<profile>.aws.region The target region to connect to Available AWS regions. Scroll down to the relevant service section
<profile>.aws.url The URL of the service (Required only when not using AWS, eg. minio, localstack, etc)  
<profile>.aws.assumeRoleArn (OPTIONAL) The ARN that represents the role to assume Only required if “assume role” is desired.
<profile>.aws.assumeRoleSession (OPTIONAL) The session name that represents the temporarily role Specify a session name that can be useful for tracking temp. role activities.
<profile>.aws.assumeRoleDuration (OPTIONAL) The duration of the role temporarily switched Specify the duration of the role switching.


Note that if “assume role” is desired, <profile>.aws.assumeRoleSession is required.

For example, suppose we have a “profile” named as projectX:
profile

projectX will be used as a “profile” throughout the “aws.s3” commands for S3-related automation.

Command Output Processing

Both the ssh commands and aws.s3 commands store the automation output to a variable (denote as var and usually the first command parameter). One can use this var for further automation such as validation or use it as parameter to subsequent commands. The command output has the following properties:

output property value explanation
${var}.protocol SFTP, SCP, AWS capture the protocol used in the command
${var}.action copy to, copy from, move to, move from, list, delete textual description of the action carried via the command
${var}.remotePath   the target remote location/path
${var}.localPath   the target local location/path
${var}.startTime   the starting time, in millisecond (i.e. epoch) when this command was executed
${var}.elapsedTime   the number of milliseconds for this command to complete, and subsequent response received by Nexial
${var}.affected   a list of fully qualified file paths that were (successfully) affected by the command
${var}.failed   a list of fully qualified file paths that failed to be affected by the command
${var}.errors   error text, if any, issued by the target server due to the execution of a command

Note that:

  • .errors would return null when none is found

The “aws.s3” command type represents a series of commands regarding AWS S3.

Available Commands