Amazon S3 Task

Overview

The Amazon S3 Task is an SSIS Control Flow task for sending and receiving files to Amazon S3 service.

Setup

Use the General page of the Amazon S3 Task Editor dialog to configure the parameters needed to send and receive files.

Parameters

Name

Specify the task name.

Description

Specify the task description.

Action

Specify the task action. This parameter has the options listed in the following table.

Option Description
Send files Sends a file. Selecting this action displays the dynamic parameters IsLocalVariable, Local, LocalVariable, ContentType, AccessPolicy, IsLocalFilterVariable, LocalFilter, LocalFilterVariable, AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable.
Receive files Receives a file. Selecting this action displays the dynamic parameters IsLocalVariable, Local, LocalVariable, AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable, IsRemoteFilterVariable, RemoteFilter, RemoteFilterVariable.
Remove remote files Removes a remote file. Selecting this action displays the dynamic parameters AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable, IsRemoteFilterVariable, RemoteFilter, RemoteFilterVariable.
Get remote files list Gets a list of remote files. Selecting this action displays the dynamic parameters ResultVariable, AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable, IsRemoteFilterVariable, RemoteFilter, RemoteFilterVariable.
Rename remote file Renames remote file. Selecting this action displays the dynamic parameters AmazonS3Connection, IsOldNameVariable, OldName, OldNameVariable, IsNewNameVariable, NewName, NewNameVariable.
Create remote directory Creates remote directory. Selecting this action displays the dynamic parameters AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable.
Remove remote directory Removes remote directory. Selecting this action displays the dynamic parameters AmazonS3Connection, IsRemoteVariable, Remote, RemoteVariable.
IsLocalVariable

Indicate whether or not the local path is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The local path is stored in a variable. Selecting this option displays the dynamic parameter LocalVariable.
False The local path is specified in a File connection manager. Selecting this option displays the dynamic parameter Local.
Local

Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager Editor

LocalVariable

Contains the local path or Stream object. Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

ContentType

Specify the content type of the uploaded file.

AccessPolicy

Select the access policy of the uploaded file. This parameter has the options listed in the following table.

Option Description
Private The file is not available for access from users other than the owner.
Public-read The file is available for read by anyone.
Public-read-write The file is available for read and write by anyone.
Authenticated-read The file is available for read only by authenticated users.
IsLocalFilterVariable (1.6 SR-1)

Indicate whether or not the local filter is stored in a variable. This parameter has the options listed in the following table.

Options Description
True The local filter is stored in a variable. Selecting this option displays the dynamic parameter LocalFilterVariable.
False The local filter is explicitly specified. Selecting this option displays the dynamic parameter LocalFilter.
LocalFilter (1.6 SR-1)

Specify local files filter criteria. The criteria is specified using FLEE expression. You can use the following elements from System.IO FileInfo class: CreationTime, Directory, DirectoryName, Extension, FullName, IsReadOnly, LastAccessTime, LastWriteTime, Length, Name.

For example, to get all zip files from the past 5 days use the following expression: LastWriteTime > Now.AddDays(-5) and Name.EndsWith(".zip")

LocalFilterVariable (1.6 SR-1)

Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

AmazonS3Connection

Select an existing Amazon S3 connection manager, or click <New connection...> to create a new connection manager.

Related Topics: Amazon S3 Connection Manager

Bucket

DEPRECATED: No longer used. The bucket is now part of Remote parameter.

Select a bucket from your Amazon S3 account.

IsRemoteVariable

Indicate whether or not the remote name is stored in a variable. This parameter has the options listed in the following table.

Option Description
True The remote name is stored in a variable. Selecting this option displays the dynamic parameter RemoteVariable.
False The remote name is specified in a File connection manager. Selecting this option displays the dynamic parameter Remote.
Remote

Select an existing File connection manager, or click <New connection...> to create a new connection manager.

Related topics: File Connection Manager

RemoteVariable

Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

ResultVariable

Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable

ExtendedRemoteFileInfo (1.6 SR-1)

Indicate whether or not ResultVariable contains an array of file names or extended file information. This parameter has the options listed in the following table.

Options Description
True The ResultVariable contains an array of IFileInfo interface objects.
False The ResultVariable contains an array of file names.

Remark(s):
Not visible in the task user interface.

Check the following script showing how to access ExtendedRemoteFileInfo ResultVariable (you must reference the CozyRoc.SSIS library in your script project):

Imports CozyRoc.SqlServer.SSIS

...

Dim fis As Object()
Dim vars As Variables
Call Dts.VariableDispenser.LockOneForRead("ResultVar", vars)
Try
    fis = CType(vars("ResultVar").Value, Object())
Finally
    Call vars.Unlock()
End Try

Dim firstInfo As IFileInfo = CType(fis(0), IFileInfo)
IsRemoteWildcard (1.6 SR-1)

Indicate whether or not the remote path is a wildcard. This property has the options listed in the following table.

Options Description
True The remote path is a wildcard.
False The remote path is an explicit specification.

Remark(s):
Not visible in the task user interface.

NoRemoteFilesFail (1.6 SR-1)

Specify if the task should fail when the specified remote files don't exist. This parameter has the options listed in the following table.

Options Description
True The task fails if the specified remote files don't exist.
False The task ignores and completes successfully if the specified remote files don't exist.

Remark(s):
Not visible in the task user interface.

IncludeSubfolders (1.6 SR-1)

Specify if remote files are recursively included. This parameter has the options listed in the following table.

Options Description
True The task includes all remote files recursively, starting from the specified remote path.
False The task includes only the specified remote path files. This is the default option.
IsRemoteFilterVariable (1.6 SR-1)

Indicate whether or not the remote filter is stored in a variable. This parameter has the options listed in the following table.

Options Description
True The remote filter is stored in a variable. Selecting this option displays the dynamic parameter RemoteFilterVariable.
False The remote filter is explicitly specified. Selecting this option displays the dynamic parameter RemoteFilter.
RemoteFilter (1.6 SR-1)

Specify remote files filter criteria. The criteria is specified using FLEE expression. You can use the following elements: Name, FullName, Size, ModifiedTime, IsDirectory.

For example, to get all zip files from the past 5 days, use the following expression: Modifiedtime > Now.AddDays(-5) and Name.EndsWith(".zip")

RemoteFilterVariable (1.6 SR-1)

Select an existing user-defined variable, or click <New variable...> to create a new variable.

Related Topics: Integration Services Variables, Add Variable