Projects, Templates, and Placements - AWS IoT 1-Click

AWS will discontinue AWS IoT 1-Click service on December 16, 2024. For more information, see AWS IoT 1-Click end-of-life FAQs. For additional support, visit AWS support center.

Projects, Templates, and Placements

Devices can be organized by function, location, or by any other criteria. This logical grouping of devices is called a project. You can use projects to associate groups of devices with Lambda functions.

Projects contain templates that specify which type of devices are used, which Lambda functions they invoke, and attribute names to hold contextual data like location or function.

Once the project is created and templates defined, you can add placements in the project. Placements follow the template and specify devices by their serial numbers and attribute values that make sense to the specific location or function of that placement.

The following examples to illustrate the use of projects and placements.

Example 1:

In the SalesPersonNotification project, 10 customers receive a button they can press to contact a salesperson. There are 10 placements, one for each customer. Each placement has values for CustomerName (for example, Mr. Jones), SalesPersonPhoneNumber (for example, 1-555-555-1234), and button serial number (for example, G030PM12345678). The device template, NotficationButton, is contained in the placement. The CustomerName and SalesPersonPhoneNumber attributes are defined for each placement. When a customer clicks the button, AWS IoT 1-Click invokes SendSMSLambda with the CustomerName and SalesPersonPhoneNumber values associated with that button. The SMS is sent based on those values.

  • Placement template:

    • Since each customer gets one button to notify a sales person, one device template named NotficationButton is created.

    • The device template (contained in the placement) specifies that the NotificationButton, when clicked, will call the SendSMSLambda Lambda function.

    • Attributes called CustomerName and SalesPersonPhoneNumber are defined for each placement.

  • Placements: 10 placements are created, one per customer. Each placement has specific values for CustomerName (e.g., "Mr. Jones"), SalesPersonPhoneNumber (e.g., 1-555-555-1234) and button serial number (e.g., G030PM12345678).

  • Operation: When a customer clicks his button, AWS IoT 1-Click invokes SendSMSLambda with the CustomerName and SalesPersonPhoneNumber values associated with that particular button - and an SMS is sent based on those values.

Example 2:

In the MeetingRoomFeedback project, user satisfaction is tracked through the pressing of Thumbs Up and Thumbs Down buttons in each of 50 conference rooms. There are two device templates, ThumbsUp and ThumbsDown.When the Thumbs Up button is clicked, the PostiveFeedbackLambda function is called. When the Thumbs Down button is clicked, the NegativeFeedbackLambda is called. A MeetingRoomNumber attribute is defined to hold the room number for each placement. 50 device placements are created, one per conference room. Each placement contains the MeetingRoomNumber key set to a room number (for example, 1001) and two buttons, as identified by their unique serial numbers (for example, G030PM12345678 and G030PM23456789). When a button is clicked in a meeting room, AWS IoT 1-Click invokes the PositiveFeedbackLambda function or NegativeFeedbackLambda function with the MeetingRoomNumber value. Feedback can then be processed and tabulated.

  • Project name: MeetingRoomFeedback

  • Placement template:

    • Since each room gets two buttons, two device templates are created, respectively named ThumbsUp and ThumbsDown.

    • The device templates specify that ThumbsUp buttons will call PostiveFeedbackLambda when clicked, and that ThumbsDown buttons will call NegativeFeedbackLambda when clicked.

    • An attribute called MeetingRoomNumber is defined to hold the room number for each placement.

  • Placements: 50 device placements are created, one placement per room. Each placement contains the MeetingRoomNumber key set to a particular room number pair (e.g., 1001) and two buttons as identified by their unique serial numbers (e.g., G030PM12345678 and G030PM23456789).

  • Operation: When a button is clicked in a meeting room, AWS IoT 1-Click invokes the PositiveFeedbackLambda function or NegativeFeedbackLambda function with the MeetingRoomNumber value – and feedback can be processed and tabulated.

The following diagram shows these concepts:

Image of 1-Click architecture.

For more information about how to create a project like Example 1 and Example 2, see Getting Started with the AWS IoT 1-Click Console.