...
Info | ||
---|---|---|
| ||
You must have a valid Amazon Web Services developer account, and be signed up to use Amazon S3. More information are available at Amazon S3. |
URI Format
Code Block |
---|
aws-s3://bucket-name[?options]
|
...
Name | Default Value | Context | Description |
---|---|---|---|
amazonS3Client |
| Shared | Reference to a |
accessKey |
| Shared | Amazon AWS Access Key |
secretKey |
| Shared | Amazon AWS Secret Key |
amazonS3Endpoint |
| Shared | The region with which the AWS-S3 client wants to work with. |
region |
| Producer | The region who the bucket is located. This option is used in the |
deleteAfterRead |
| Consumer | Delete objects from S3 after it has been retrieved. |
deleteAfterWrite |
| Producer | Camel 2.11.0 Delete file object after the S3 file has been uploaded |
maxMessagesPerPoll | 10 | Consumer | The maximum number of objects which can be retrieved in one poll. Used in in the |
policy |
| Shared | Camel 2.8.4: The policy for this queue to set in the |
storageClass |
| Producer | Camel 2.8.4: The storage class to set in the |
prefix |
| Consumer | Camel 2.10.1: The prefix which is used in the |
multiPartUpload | false | Producer | Camel 2.15.0: If it is true, camel will upload the file with multi part format, the part size is decided by the option of partSize |
partSize |
| Producer | Camel 2.15.0: Setup the partSize which is used in multi part upload, the default size is 25M. |
Info | ||
---|---|---|
| ||
You have to provide the amazonS3Client in the Registry or your accessKey and secretKey to access the Amazon's S3. |
...
If your Camel Application is running behind a firewall or if you need to have more control over the AmazonS3
instance configuration, you can create your own instance:
Code Block |
---|
AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setProxyHost("http://myProxyHost");
clientConfiguration.setProxyPort(8080);
AmazonS3 client = new AmazonS3Client(awsCredentials, clientConfiguration);
registry.bind("client", client);
|
and refer to it in your Camel aws-s3 component configuration:
Code Block |
---|
from("aws-s3://MyBucket?amazonS3Client=#client&delay=5000&maxMessagesPerPoll=5")
.to("mock:result");
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws</artifactId>
<version>${camel-version}</version>
</dependency>
|
where ${camel-version
} must be replaced by the actual version of Camel (2.8 or higher).
Include Page | ||||
---|---|---|---|---|
|