Amazon S3 Transport
Amazon Simple Storage Service(Amazon S3:http://aws.amazon.com/s3/)provides highly scalable, reliable, fast, inexpensive data storage infrastructure. Also, it provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.
*Note: You must have an Amazon AWS account to use S3 Transport.
Status
0.1-SNAPSHOT is out on 2009/07/16! try it on!
dowoload from here.
Functions
- outbound:PUT/GET/DELETE objects to S3
- inbound: GET(polling) objects from S3
- DevPay (may not be included in alpha release)
Dependencies
This connector relies on a library called jets3t 0.7.1, which is a free, open-source Java toolkit and application suite for the Amazon Simple Storage Service (Amazon S3).
Usage for Mule 2.2
Namespace declaration:
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s3="http://www.mulesource.org/schema/mule/s3/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/s3/2.2
http://svn.muleforge.org/amazonsss/trunk/src/main/resources/META-INF/mule-s3.xsd
">
Connector definition:
(without proxy)
<s3:connector name="s3Connector" awsAccessKey="#AWS_ACCESSKEY#" awsSecretKey="#AWS_SECRETKEY#" />
(with proxy)
<s3:connector name="s3Connector" awsAccessKey="#AWS_ACCESSKEY#" awsSecretKey="#AWS_SECRETKEY#"
proxyHostname="proxy.some.where" proxyPort="#PROXY_PORT_NUMBER#"
proxyUsername="#PROXY_USERNAME#" proxyPassword="#PROXY_PASSWORD#" />
Outbound endpoint definition:
In outbound setting, the names of bucket and resource can be written in mule expressions.
(PUT an object from S3)
<s3:outbound-endpoint address="s3://s3.amazonaws.com/" connector-ref="s3Connector"
method="put" bucket="#[mule:context.modelName]" resource="#[header:resource_name]"/>
(GET an object from S3)
<s3:outbound-endpoint address="s3://s3.amazonaws.com/" connector-ref="s3Connector"
method="get" bucket="#[mule:context.modelName]" resource="#[message:payload]" />
(DELETE an object from S3)
<s3:outbound-endpoint address="s3://s3.amazonaws.com/" connector-ref="s3Connector"
method="delete" bucket="#[mule:context.modelName]" resource="#[message:payload]"/>
Inbound endpoint definition:
In inbound setting, the names of bucket and resource can ONLY written in CONSTANT string.
(GETTING an object from S3 every "pollingFrequency" miliseconds)
<s3:inbound-endpoint address="s3://s3.amazonaws.com/" connector-ref="s3Connector"
bucket="mule2S3-test" resource="Shingo.obj" pollingFrequency="1500"/>
Sample Configuration
see this file.