Cumulocity > WebMethods > AWS S3
In this example we will send IoT logs from webMethods to AWS S3
I. AWS instance running with an available S3 bucket, Access Key and Secret Key will be required when registering Access to your AWS enviroment
II. Cumulocity account with at least 1 registered IoT device
- Lets start by creating a new workflow from scratch, you should now see a workflow canvas shown below.
- Double click the start icon, scroll down the list of triggers and select Cumulocity. You will now be able to set a label name for your Trigger. We will leave the Select Trigger field as "Alarm". If this is your first time connecting Cumulocity, you will have to click the "+" button and enter your Cumulocity Tenant and Credentials(Hover over the lightbulb for examples). Last you will have to enter your device ID(Device ID can be found in Cumulocity under the device information).
- Click and drop the AWS icon from the list of application on the right panel onto the canvas. Connect the start icon to the AWS icon and also connect the AWS icon to the end icon.
- Double click the AWS icon and from the list of Actions select "S3 Upload File". You will now have to click the "+" sign and connect to your AWS instance by entering the required Keys, when finished click "Add".
- From the mapping screen we will now enter the S3 bucket that you want files uploaded into. We can now also customize the Cumulocity Data we want to recieve and store in a file for each alarm. In the Example below for the File name I used the Id + @ + time + .txt (example file name : 37417_@_2018-12-18T06:54:20.007Z.txt). In the Raw Data field I added the string of information and made the content type as "text/plain" . Click the "Next" button and Test your configured Data. When test has passed click the "Done" button.
- It is very important to remeber to save your workflow in order to start executing the workflow!
- To test the workflow, trigger an alarm from your device, you will see the workflow execute and save the file into your specified S3 bucket.