1

I have to do POC with WSO2 6.5 EI - Amazon S3 Connector.

My Task is “Need to get files from Amazon s3 to local then load those file’s values into database”

Simply need to watch amazon s3 bucket for every 5 minutes if objects uploaded into bucket means move those files into local then continue for further processing.

Please guide me to do further. I am facing error and issues.

Herewith I have attached my sample proxy (Note : with the help of Task am triggering the proxy).

Please have a look on it.

Looking forward for a positive reply.

    <target>
        <inSequence>
            <property expression="get-property('transport', 'FILE_NAME')" name="fname" scope="default" type="STRING"/>       
            <property name="contentType" value="text/plain"/>
            <property name="filename" expression="get-property('transport', 'FILE_NAME')"/>
            <log level="custom">
                <property name="log" value="====S3 to Local===="/>
            </log>
            <amazons3.init>
                <accessKeyId>****</accessKeyId>
                <secretAccessKey>****</secretAccessKey>
                <region>****</region>
                <methodType>GET</methodType>
                <contentType>{$ctx:contentType}</contentType>
                <host>BUCKETNAME.s3.REGION.amazonaws.com</host>
                <isXAmzDate>true</isXAmzDate>
                <bucketName>BUCKETNAME</bucketName>
            </amazons3.init>
            <log level="custom">
                <property name="log" value="====After Amazon S3 Init===="/>
            </log>
            <amazons3.getObjectsInBucket>
                <bucketUrl>http://s3.REGION.amazonaws.com/BUCKETNAME</bucketUrl>                
            </amazons3.getObjectsInBucket>
            <log level="custom">
                <property name="log" value="==== After getObjectsInBucket ===="/>                  
                <property name="Notification " value="File - Objects Taken From S3 - Completed"/>
                <property name="filename " expression="get-property('filename')"/>
            </log>
            <send>
                <endpoint name="S3_Response_EP">
                    <address uri="vfs:file:///E:/FromS3"/>
                </endpoint>
            </send>
            <log level="custom">
                <property expression="get-property('filename')" name="filename "/>
                <property name="Notification" value="File - Objects Moved to Local - Completed"/>
            </log>
            <drop/>
        </inSequence>
        <outSequence/>           
        <faultSequence/>
    </target>  
</proxy>
Community
  • 1
  • 1
Sumathi
  • 93
  • 10
  • Can you explain the errors and issues that are facing? – Arunan Sugunakumar Jan 21 '20 at 04:13
  • I received response.xml file in Endpoint location. response.xml contains error response only. SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method. – Sumathi Jan 21 '20 at 04:45

0 Answers0