Skip to content

AWS EveryCloud Example


In this tutorial we will see how to create an Elasticsearch instance on AWS and configure it as an external application to use with claimed devices in your Device Portal. Events from devices will be sent to Elasticsearch for indexing and we can use Kibana to create dashboards and visualized our data.



  • AWS account with permission to launch services and create IAM roles
  • Have an account on the Device Portal connected & claimed devices. See the device owner page for more info.

Setup AWS application

To simplify the setup of the required AWS services we have prepared an AWS CloudFormation template.

  1. Copy and save the CloudFormation Template 'api-lambda-es.yaml' on your computer
  2. Sign in to your AWS account at
  3. Go to the CloudFormation service page



  1. Click Create stack


  1. Choose Upload a template file and upload api-lambda-es.yaml from step 1


  1. Configure template parameters
  2. Give a cloudformation stack name, ex: pdaas-demo-app
  3. Go to to get your current public IP and add it to AllowedIPs
  4. Replace the Token field with random value and remember it as we will use it later.
  5. (Optional) Configure elasticsearch setup
  6. Click Next


  1. No need for custom stack options so can click Next again


  1. We have to acknowledge that the template will create an IAM role (used to give Lambda permission to Elasticsearch) and then click Create stack


  1. AWS CloudFormation will create and configure our services, it will take ~15 minutes to complete.
  2. Once complete we can go to the Outputs tab to see the relevant URLs created


Connect External Application

  1. In the Device Portal, we can click the "hamburger" menu button in the top left corner to access the application page.



  1. Once in the Device Portal's application page we click CONNECT APP to configure our Elasticsearch application.


  1. We will use the following configuration
  2. Give an appropriate name, ex: AWS Elasticsearch
  3. Select External HTTPS application type
  4. For HTTPS callback URL we can copy the LambdaAPI URL from our CloudFormation Outputs tab
  5. Choose token as Authentication type
  6. Leave Token prefix empty, and input the token used to create the AWS Elasticsearch stack
  7. Click CONNECT APP to finalize the setup


After adding an application we will see a popup with a token. This token can be used for external applications to interface with some of the available Device Portal API's such as list devices.

Our Elasticsearch instance does not use such functionality so we can just close this popup.


If there are devices connected and sending events to our Device Portal application we should now see a green-mark indicating that our Elasticsearch app has received and successfully acknowledged device events.


In application details, we can also see the last callback status.


Create Kibana visualization

We can now create visualizations for our device events using Kibana. In the application of this example there are two devices connected, device001 and device002. These two devices are sending a number to a resource called temp. We will create a bar graph for this resource grouped by device identity.

  1. Go to the Kibana UI by clicking the Kibana URL in the AWS CloudFormation Outputs tab
  2. We are then greeted by the Kibana setup page, here we will click Explore on my own


  1. On the Kibana main page we can click Connect to your Elasticsearch Index


  1. Indexes are automatically created when device events are successfully reaching our Elasticsearch. So if we have devices sending data we should see a pdaas-yyy-mm-dd index created. We will add a wildcard pattern for pdaas*


  1. Next we need to select our timestamp field @timestamp and finally click Create index pattern


  1. We can now see our index pattern and all available fields


  1. Next we can click the Visualize tab


  1. Click Create a visualization and select Visual Builder


  1. Change Aggregation to average and field to our data.resources.temp and set Group by to Terms and By to data.identity.keyword


  1. Go to Options tab next to Metrics and change Chart type to bar, Stacked to Stacked and Split color theme to Rainbow


  1. We now have our stacked bar graph over temp split by device identity with live data from our devices kibana-visualization