AWS IoT Thing

This page shows how to write Terraform and CloudFormation for AWS IoT Thing and write them securely.

aws_iot_thing (Terraform)

The Thing in AWS IoT can be configured in Terraform with the resource name aws_iot_thing. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

thing.tf#L1
resource "aws_iot_thing" "anything" {
  lifecycle {
    create_before_destroy = true
  }

  name = "anything"
iot.tf#L5
resource "aws_iot_thing" "iot_thing" {
  count = length(var.things)
  name  = var.things[count.index]
}

resource "aws_iot_certificate" "iot_certificate" {
main.tf#L1
resource "aws_iot_thing" "siouxsilos_thing" {
  name = var.siouxsilos_thing_name
}
thing.tf#L5
resource "aws_iot_thing" "iot-thing-data" {
   name = "thing-1"
main.tf#L7
resource "aws_iot_thing" "Test" {
  name            = var.thing_name
  thing_type_name = var.thing_type
}

resource "aws_iot_thing_type" "thingtype" {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Creates and manages an AWS IoT Thing.

AWS::IoT::Thing (CloudFormation)

The Thing in IoT can be configured in CloudFormation with the resource name AWS::IoT::Thing. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

Use the AWS::IoT::Thing resource to declare an AWS IoT thing.

For information about working with things, see How AWS IoT Works and Device Registry for AWS IoT in the AWS IoT Developer Guide.

Frequently asked questions

What is AWS IoT Thing?

AWS IoT Thing is a resource for IoT of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS IoT Thing?

For Terraform, the adudek/iot-upskill, mindmelting/iot-neopixel and 10kloud/infrastructure source code examples are useful. See the Terraform Example section for further details.