This documentation is for Amazon S3 connector version 1.0.4. If you are using Amazon S3 connector version 1.0.5, go to the WSO2 Amazon S3 connector GitHub repository to view the latest documentation.
Connecting to Amazon S3
To use the Amazon S3 connector, add the
<amazons3.init> element in your configuration before carrying out any Amazon S3 operations. This Amazon S3 configuration authenticates with Amazon S3 by specifying the AWS access key ID and secret access key ID, which are used for every operation. The signature is used with every request and thus differs based on the request the user makes.
accessKeyId: AWS access key ID.
secretAccessKey: AWS secret access key.
methodType: HTTP method type.
contentType: Content type of the resource.
addCharset: Set to
trueto add the charset in the
ContentTypeheader of POST and HEAD methods when you are using the connector with ESB 4.9.0.
bucketName: Name of the bucket.
isXAmzDate: Indicates whether the current date and time are considered to calculate the signature. Valid values:
expect: This header can be used only if a request is sent not to send the request body until it receives an acknowledgement. Valid value:
contentMD5: Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.
xAmzSecurityToken: The security token based on whether Amazon DevPay operations or temporary security credentials are used.
contentLength: Length of the message without the headers according to RFC 2616.
host: The path-style requests (s3.amazonaws.com) or virtual-style requests (BucketName.s3.amazonaws.com).
xAmzAcl: Sets the ACL of the bucket using the specified canned ACL.
xAmzGrantRead: Allows the specified grantee or grantees to list the objects in the bucket.
xAmzGrantWrite: Allows the specified grantee or grantees to create, overwrite, and delete any object in the bucket.
xAmzGrantReadAcp: Allows the specified grantee or grantees to read the bucket ACL.
xAmzGrantWriteAcp: Allows the specified grantee or grantees to write the ACL for the applicable bucket.
xAmzGrantFullControl: Allows the specified grantee or grantees the READ, WRITE, READ_ACP, and WRITE_ACP permissions on the bucket.
Ensure that the following Axis2 configurations are added and enabled in the
Required message formatters
Required message builders
Now that you have connected to Amazon S3, use the information in the following topics to perform various operations with the connector.
IO exception caused by one of the following:
Invalid keys (invalid encoding, wrong length, uninitialized, etc.)
Cryptographic algorithm is requested but is not available.
Character encoding is not supported.
Unspecified general exception.