Amazon S3 - End Session

Declaration

<AMAWSS3 ACTIVITY="end_session" SESSION="text" />

Description: Ends an S3 session created in a previous step with the use of the Create Session activity.

IMPORTANT: The AWS S3 activities are performed using Amazon's Simple Storage Service engine, therefore, launching and operating Amazon S3 a valid Access Key ID and Secret Access Key.

Practical Usage

Used to end an existing S3 session.

Credentials Parameters

Property

Type

Required

Default

Markup

Description

Session

Text

Yes

(Empty)

SESSION="S3Session2"

Specifies the name of the session to end.

NOTE: To create and start a session, use the S3 - Create session activity.

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

Description: This task populates a dataset with a list of objects contained in a specific bucket. The dataset is then looped and within each iteration, information about the current object is displayed in a message box.

<AMAWSS3 ACTIVITY="create_session" 
SESSION="mySession" ACCESSKEY="AKIAJU2LHLMG6BA6BZTA" 
SECRETKEY="AM1B2xUP4i/Z1KM5ySNpiipKpe+rOm+wdDFaME" />

<AMAWSS3 ACTIVITY="get_objects_dataset" 
BUCKETNAME="myBucket" RESULTDATASET="test" 
SESSION="mySession" />

<AMLOOP TYPE="DATASET" DATASET="test">
<AMMESSAGEBOX>Owner - %test.ETag%
Key Name - %test.KeyName% Last Modified Date - %test.LastModified%
Owner - %test.Owner% Size - %test.Size% 
Storage Class - %test.StorageClass%</AMMESSAGEBOX>
</AMLOOP> 

<AMAWSS3 ACTIVITY="end_session" 
SESSION="mySession" />