|
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 (encrypted)" />
Description
Creates a unique session which can be used to associate subsequent Amazon S3 steps. This provides a single task the ability to execute numerous Amazon S3 operations simultaneously.
Practical Usage
Ideally used to create a session to correlate subsequent Amazon 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 Amazon S3 - End session activity.
Parameters
Credentials
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Access key | Text | Yes | (Empty) | ACCESSKEY="key text (encrypted)" |
A 20-character, alphanumeric string that uniquely identifies a user who owns an Amazon S3 account (for example, 022QF06E7MXBSH9DHM02). This along with a Secret Access Key forms a secure information set that Amazon S3 uses to confirm a valid user's identity. |
Secret access key | Text | Yes | (Empty)
|
SECRETKEY="key text (encrypted)" | A 40-character string that serves the role as password to access Amazon S3 (for example, kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct). |
Session | Text | Yes | S3Session | SESSION="mySession" | Specifies
the session name to create for this activity. Subsequent Amazon S3 activities
can be linked to this session allowing several Amazon S3 operations
(that may contain multiple activities) to be performed within
a single task. The default session name is S3Session1. NOTE:
Make sure to use an Amazon S3
- End session activity to end a particular session. |
Protocol | Text | Yes | HTTP | PROTOCOL = "HTTPS" |
Specifies the protocol that should be used to make requests to the Amazon 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 Amazon S3 regions, along with associated endpoints and valid protocols can be found below under Amazon S3 Endpoints and Regions . |
Maximum number of retries 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 (for example, server.domain.com) or IP address (for example, 192.168.0.100) 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). |
Additional Notes
Amazon S3 Endpoints and Regions
This table contains a complete list of Amazon Simple Storage Service 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.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This sample 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 dialog box.
<AMAWSS3 ACTIVITY="create_session" SESSION="mySession" ACCESSKEY="AKIAJU2LHLMG6BA6BZTA" SECRETKEY="AM1B2xUP4i/Z1KM5ySNpiipKpe+rOm+wdDFaME" />
<AMAWSS3 ACTIVITY="list_objects" PROVIDER="session_based" SESSION="S3Session1" BUCKETNAME="myBucket" RESULTDATASET="test" />
<AMLOOP ACTIVITY="dataset" DATASET="test" />
<AMSHOWDIALOG>Owner - %test.ETag%Key Name - %test.KeyName%Last Modified Date - %test.LastModified%Owner - %test.Owner%Size - %test.Size%Storage Class - %test.StorageClass%</AMSHOWDIALOG>
<AMLOOP ACTIVITY="end" />
<AMAWSS3 ACTIVITY="end_session" SESSION="mySession" />