Amazon S3 - Create Session
Declaration
<AMAWSS3 ACTIVITY="create_session" SESSION="text" ACCESSKEY="text" SECRETKEY="text (encrypted)" PROTOCOL="text (options)" USERAGENT="text" MAXERRORRETRY="number" SERVICEURL="text" PROXYHOST="text" PROXYPORT="number" PROXYUSER="text" PROXYPWD="text (options)" />
Description: Creates a unique session which can be used to associate subsequent S3 steps. This provides a single task the ability to execute numerous S3 operations simultaneously.
Practical Usage
Ideally used to create a session to correlate subsequent S3 activities to. Numerous sessions can be created for a single task. These sessions can run parallel with other sessions contained in the same task without interfering with one another. To end a session, use the S3 - End session activity.
Credentials Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Property |
Type |
Required |
Default |
Markup |
Description |
Access Key |
Text |
Yes |
(Empty) |
ACCESSKEY="MyAccessKey" |
A 20-character, alphanumeric string that uniquely identifies a user who owns a S3 account (e.g., 022QF06E7MXBSH9DHM02). This along with a Secret Access Key forms a secure information set that S3 uses to confirm a valid user's identity. |
Secret Access Key |
Text |
Yes |
(Empty)
|
SECRETKEY="SecretKey" |
A 40-character string that serves the role as Password to access S3 (e.g., kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct). |
Session |
Text |
Yes |
S3Session |
SESSION="mySession" |
Specifies the session name to create for this activity. Subsequent S3 activities can be linked to this session allowing several S3 operations (that may contain multiple activities) to be performed within a single task. The default session name is S3Session. NOTE: Make sure to use an S3 - End Session activity to end a particular session. |
Protocol |
Text |
Yes |
HTTP |
MARKUP: PROTOCOL = "HTTPS" |
Specifies the protocol that should be used to make requests to the S3 service. The available options are:
|
User Agent |
Text |
Yes |
AutoMate |
USERAGENT="AutoMate" |
Sometimes it's necessary for a web site to understand how it is being viewed, so most user agents identify themselves by sending a User Agent string to the web site. The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. The default value is AutoMate. |
Service URL |
Text |
No |
(Empty) |
SERVICEURL= "https://s3.eu-west-1.amazonaws.com" |
The URL that provides the service endpoint. To make the service call to a different region, you can pass the region-specific endpoint URL. For example, entering https://s3.us-west-1.amazonaws.com points to US West (Northern California) region. A complete list of S3 regions, along with associated endpoints and valid protocols can be found below under S3 Endpoints and Regions. |
Maximum retry on error |
Number |
No |
(Empty) |
MAXERRORRETRY="4" |
Indicates how many times the Amazon S3 Engine should retry the request before generating an error. |
Proxy Host |
Text |
No |
(Empty) |
PROXYHOST="proxy.host.com" |
The hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. |
Proxy Port |
Number |
No |
(Empty) |
PROXYPORT="1028" |
The port that should be used to connect to the proxy server. |
Proxy username |
Text |
No |
(Empty) |
PROXYUSER="username" |
The username that should be used to authenticate connection with the proxy server (if required). |
Proxy password |
Text |
No |
(Empty) |
PROXYPWD="encrypted" |
The password that should be used to authenticate connection with the proxy server (if required). |
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.)
S3 Endpoints and Regions
This table contains a complete list of Amazon endpoints, along with their corresponding regions, supported protocols and location constraints.
Endpoint |
Region |
Protocol |
Location Constraints |
---|---|---|---|
s3.amazonaws.com |
US Standard * |
HTTP and HTTPS |
(none required) |
s3.us-west-2.amazonaws.com |
US West (Oregon) Region |
HTTP and HTTPS |
us-west-2 |
s3.us-west-1.amazonaws.com |
US West (Northern California) Region |
HTTP and HTTPS |
us-west-1 |
s3.eu-west-1.amazonaws.com |
EU (Ireland) Region |
HTTP and HTTPS |
EU |
s3.ap-southeast-1.amazonaws.com |
Asia Pacific (Singapore) Region |
HTTP and HTTPS |
ap-southeast-1 |
s3.ap-southeast-2.amazonaws.com |
Asia Pacific (Sydney) Region |
HTTP and HTTPS |
ap-southeast-2 |
s3.ap-northeast-1.amazonaws.com |
Asia Pacific (Tokyo) Region |
HTTP and HTTPS |
ap-northeast-1 |
s3.sa-east-1.amazonaws.com |
South America (Sao Paulo) Region |
HTTP and HTTPS |
sa-east-1 |
* The US Standard region automatically routes requests to facilities in Northern Virginia or the Pacific Northwest using network maps.
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" />