Urban.io for AWS IoT SiteWise on the AWS Cloud

Quick Start Reference Deployment

QS

October 2021
Desislava Hubanova, Urban.io
Vladislav Trayanov and Eric Mutuku, GotoAdmins
Vanitha Ramaswami, AWS WWCO Partner Core
Shivansh Singh, AWS Integration & Automation team

Visit our GitHub repository for source files and to post feedback, report bugs, or submit feature ideas for this Quick Start.

This Quick Start was created by Urban.io Pty Ltd. in collaboration with Amazon Web Services (AWS). Quick Starts are automated reference deployments that use AWS CloudFormation templates to deploy key technologies on AWS, following AWS best practices.

Overview

This guide provides instructions for deploying the Urban.io for AWS IoT SiteWise reference architecture on the AWS Cloud. This Quick Start is for reliability engineers and operations managers to collect, model, and monitor Urban.io sensor data with AWS IoT SiteWise.

Amazon may share user-deployment information with the AWS Partner that collaborated with AWS on the Quick Start.

Urban.io for AWS IoT SiteWise on AWS

This Quick Start deploys a serverless framework that integrates Urban.io sensors with AWS IoT SiteWise on the Amazon Web Services (AWS) Cloud.

The deployment uses a map file, uploaded to Amazon Simple Storage Service (Amazon S3), to create the initial set of assets displayed in AWS IoT SiteWise. Assets are the virtualized representations of your Urban.io sensors in AWS IoT SiteWise. As you update and add new sensors in Urban.io, AWS IoT Core passes lifecycle events to AWS Lambda functions, which update your assets in AWS IoT SiteWise accordingly. AWS IoT Core also processes Urban.io sensor readings and sends them to AWS IoT SiteWise.

You can use AWS IoT SiteWise Monitor to build managed web applications with dashboards to visualize and share Urban.io data.

AWS costs

You are responsible for the cost of the AWS services and any third-party licenses used while running this Quick Start. There is no additional cost for using the Quick Start.

The AWS CloudFormation templates for Quick Starts include configuration parameters that you can customize. Some of the settings, such as the instance type, affect the cost of deployment. For cost estimates, see the pricing pages for each AWS service you use. Prices are subject to change.

After you deploy the Quick Start, create AWS Cost and Usage Reports to deliver billing metrics to an Amazon Simple Storage Service (Amazon S3) bucket in your account. These reports provide cost estimates based on usage throughout each month and aggregate the data at the end of the month. For more information, see What are AWS Cost and Usage Reports?

Software licenses

All charges associated with the Asset Monitoring IIoT Datastream Subscription are incurred based on the terms of your AWS Marketplace subscription.

All AWS service resources consumed during the launch of the Quick Start incur AWS service usage costs.

Architecture

Deploying this Quick Start for a new integration between Urban.io and AWS IoT SiteWise builds the following environment in the AWS Cloud.

Architecture
Figure 1. Quick Start architecture for Urban.io for AWS IoT SiteWise

Resources

As shown in Figure 1, the Quick Start sets up the following:

  • Amazon S3 to store initial map and configuration files from an integrated Urban.io account.

  • AWS IoT Core to do the following:

    • Send lifecycle events from Urban.io (when a user creates or updates a device) to AWS Lambda to update AWS IoT SiteWise assets.

    • Send device readings from Urban.io to AWS IoT SiteWise to display.

  • AWS Lambda to do the following:

    • Cache mappings and configurations from Amazon S3 to Amazon DynamoDB tables.

    • Convert Urban.io lifecycle events from AWS IoT Core to AWS IoT SiteWise assets and send updated assets to AWS IoT SiteWise.

  • Amazon DynamoDB to store mappings and configurations for AWS Lambda.

  • Amazon Simple Queue Service (Amazon SQS) to queue lifecycle events for processing by AWS Lambda.

  • AWS IoT SiteWise to collect, manage, and visualize assets.

Planning the deployment

Specialized knowledge

This deployment requires a moderate level of familiarity with AWS services. If you’re new to AWS, see Getting Started Resource Center and AWS Training and Certification. These sites provide materials for learning how to design, deploy, and operate your infrastructure and applications on the AWS Cloud.

This Quick Start also assumes familiarity with creating portals and dashboards in AWS IoT SiteWise. For more information, see Monitoring data with AWS IoT SiteWise Monitor.

AWS account

If you don’t already have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions. Part of the sign-up process involves receiving a phone call and entering a PIN using the phone keypad.

Your AWS account is automatically signed up for all AWS services. You are charged only for the services you use.

Technical requirements

Before you launch the Quick Start, review the following information and ensure that your account is properly configured. Otherwise, deployment might fail.

Resource quotas

If necessary, request service quota increases for the following resources. You might need to request increases if your existing deployment currently uses these resources and if this Quick Start deployment could result in exceeding the default quotas. The Service Quotas console displays your usage and quotas for some aspects of some services. For more information, see What is Service Quotas? and AWS service quotas.

Resource This deployment uses

AWS Identity and Access Management (IAM) roles

10

DynamoDB tables

4

AWS Lambda functions

7

AWS IoT topic rules

2

Amazon SQS queues

3

S3 buckets

2

Amazon CloudWatch alarms

6

Amazon Simple Notification Service (Amazon SNS) topics

1

Amazon SNS subscriptions

1

Supported AWS Regions

This Quick Start supports the following Regions:

  • us-east-1, US East (N. Virginia)

  • us-west-2, US West (Oregon)

  • eu-west-1, Europe (Ireland)

  • eu-central-1, Europe (Frankfurt)

  • ap-southeast-1, Asia Pacific (Singapore)

  • ap-southeast-2, Asia Pacific (Sydney)

IAM permissions

Before launching the Quick Start, you must sign in to the AWS Management Console with IAM permissions for the resources that the templates deploy. The AdministratorAccess managed policy within IAM provides sufficient permissions, although your organization may choose to use a custom policy with more restrictions. For more information, see AWS managed policies for job functions.

Deployment options

This Quick Start provides one deployment option:

  • Deploy Urban.io for AWS IoT SiteWise. This option creates resources to deploy Urban.io for AWS IoT SiteWise.

The Quick Start provides a template for this integration with parameters that you can configure. For more information, see Deployment steps.

Prepare your AWS account

To ensure proper synchronization of the Urban.io domain model with AWS IoT SiteWise, you must request increases to the following AWS IoT SiteWise quotas:

  • Number of child assets per parent asset. The default is 100. Request 500.

  • Number of asset models per hierarchy tree. The default is 20. Request 50.

You must request these increases to successfully prepare your Urban.io account in the next section. For more information, see Requesting a quota increase.

Prepare your {partner-company-short-name} account

This Quick Start requires an Asset Monitoring IIoT Datastream subscription from Urban.io, available on AWS Marketplace. After subscribing, Urban.io will contact you and guide you through the installation. For more information about subscriptions, contact Urban.io.

After deploying the Quick Start, you must configure integration between your Urban.io account and AWS IoT SiteWise. For more information, see Post-deployment steps later in this guide.

Deployment steps

Sign in to your AWS account

  1. Sign in to your AWS account with an IAM user role that has the necessary permissions. For details, see Planning the deployment earlier in this guide.

  2. Make sure that your AWS account is configured correctly, as discussed in the Technical requirements section.

Subscribe to Asset Monitoring IIoT Datastream on AWS Marketplace

This Quick Start requires a subscription to Asset Monitoring IIoT Datastream on AWS Marketplace.

  1. Sign in to your AWS account.

  2. In AWS Marketplace, open the page for Asset Monitoring IIoT Datastream Subscription, and then choose Continue to Subscribe.

  3. Review the terms and conditions for software usage, and then choose Accept Terms. A confirmation page loads, and an email confirmation is sent to the account owner. For detailed subscription instructions, see the AWS Marketplace documentation.

Launch the Quick Start

Each deployment takes about 10 minutes to complete.

  1. Sign in to your AWS account, and choose the link below to launch the AWS CloudFormation template.

    Deploy Urban.io for AWS IoT SiteWise

    View template

  2. Check the AWS Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This Region is where you build the network infrastructure. The template is launched in the us-east-1 Region by default. For other choices, see Supported Regions earlier in this guide.

  3. On the Create stack page, keep the default setting for the template URL, and then choose Next.

  4. On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. For details on each parameter, see the Parameter reference section of this guide. When you finish reviewing and customizing the parameters, choose Next.

  5. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you finish, choose Next.

  6. On the Review page, review and confirm the template settings. Under Capabilities, select the two check boxes to acknowledge that the template creates IAM resources and might require the ability to automatically expand macros.

  7. Choose Create stack to deploy the stack.

  8. Monitor the status of the stack. When the status is CREATE_COMPLETE, the Urban.io deployment is ready.

  9. To view the created resources, see the values displayed in the Outputs tab for the stack.

Postdeployment steps

After deploying the Quick Start, you must configure integration between your Urban.io account and AWS IoT SiteWise. For instructions, log onto your Urban.io account and see Receiving data from Urban.io IoT devices on AWS IoT SiteWise.

Test the deployment

After configuring integration, confirm that the deployed AWS Lambda functions run without errors. For more information, see Accessing Amazon CloudWatch logs for AWS Lambda. Also, check the deployed DynamoDB tables for records.

FAQ

Q. I encountered a CREATE_FAILED error when I launched the Quick Start.

A. If AWS CloudFormation fails to create the stack, relaunch the template with Rollback on failure set to Disabled. This setting is under Advanced in the AWS CloudFormation console on the Configure stack options page. With this setting, the stack’s state is retained, and the instance keeps running so that you can troubleshoot the issue. (For Windows, look at the log files in %ProgramFiles%\Amazon\EC2ConfigService and C:\cfn\log.)

When you set Rollback on failure to Disabled, you continue to incur AWS charges for this stack. Delete the stack when you finish troubleshooting.

For more information, see Troubleshooting AWS CloudFormation.

Q. I encountered a size-limitation error when I deployed the AWS CloudFormation templates.

A. Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template-size limitations. For more information, see AWS CloudFormation quotas.

Customer responsibility

After you successfully deploy this Quick Start, confirm that your resources and services are updated and configured — including any required patches — to meet your security and other needs. For more information, see the AWS Shared Responsibility Model.

Parameter reference

Unless you are customizing the Quick Start templates for your own deployment projects, keep the default settings for the parameters labeled Quick Start S3 bucket name, Quick Start S3 bucket Region, and Quick Start S3 key prefix. Changing these parameter settings automatically updates code references to point to a new Quick Start location. For more information, see the AWS Quick Start Contributor’s Guide.

Urban.io for AWS IoT SiteWise

Table 1. Urban.io configuration
Parameter label (name) Default value Description

S3 bucket (S3Bucket)

Requires input

The S3 bucket for the initial integration setup files and object definitions. Please keep the exact name as it will be required in app.urban.io during the integration. The name for the S3 bucket - must be globally unique (3-63 lowercase letters or numbers)

The email address to be used for alarm notifications (EmailAddress)

Requires input

Email address to be use for Amazon CloudWatch alarm notifications.

Urban.io AWS account number (UrbanioAccountNumber)

Requires input

Urban.io AWS account number.

Table 2. AWS account access
Parameter label (name) Default value Description

Allow cross-account access (AllowCrossAccountAccess)

false

Grant Urban.io permissions to upload data to Amazon S3 and send messages to AWS IoT Core topics.

Table 3. AWS Quick Start configuration
Parameter label (name) Default value Description

Quick Start S3 bucket name (QSS3BucketName)

aws-quickstart

Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html.

Quick Start S3 key prefix (QSS3KeyPrefix)

quickstart-urbanio-iot-aas/

S3 key prefix that is used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you are customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html.

Send us feedback

To post feedback, submit feature ideas, or report bugs, use the Issues section of the GitHub repository for this Quick Start. To submit code, see the Quick Start Contributor’s Guide.

Quick Start reference deployments

GitHub repository

Visit our GitHub repository to download the templates and scripts for this Quick Start, to post your comments, and to share your customizations with others.


Notices

This document is provided for informational purposes only. It represents AWS’s current product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the License for specific language governing permissions and limitations.