From Zero to Hero: A Beginner's Guide to AWS IoT Things, Certificates, Policies, Rules, and Topics
Tags: awsiotcore, awscommunitybuilders, terraform, awsdevopsinbigdata
Published: 2023-03-18 14:43:22

***L***et's pick up where we [left off](https://dev.to/aws-builders/the-ultimate-guide-to-aws-iot-core-what-it-is-how-it-helps-and-real-world-use-cases-mini-project-intro-3agn). First, we'll delve into the exciting features that AWS IoT Core has to offer and how they'll be utilized in our project. Don't worry - I'll do my best to explain everything in plain English. We'll also explore in our next article how to install AWS-CLI and learn some CLI commands that will allow us to generate some dummy data and gain real-world experience using this powerful AWS resource. 

Let's take a look at the list of resources we'll be covering today and define each of them.

1. AWS IoT Thing or Things
2. AWS IoT Certificates
3. AWS IoT Policies
4. AWS IoT Rules
5. AWS IoT Topics

![IoTThing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gio4jsy541p09rpbkpxk.png)
__What are AWS IoT Thing or Things?__ 

AWS IoT Things are physical or virtual devices that connect to the AWS IoT Core service. These devices can be sensors, actuators, or any other device that can communicate with the internet. AWS IoT Things must have a unique identifier called a Thing Name, and they can be organized into Thing Groups for better management.  

![cert](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1058tcbtx0bg9x34dsmw.png)
__What are AWS IoT Certificates?__ 

AWS IoT Certificates are used to secure communication between AWS IoT Things and the AWS IoT Core service. Certificates are issued by AWS IoT and can be used to authenticate and authorize the devices. There are two types of certificates: __Device certificates__ and __Server certificates__.  

Device certificates are used to authenticate the devices, while Server certificates are used to authenticate the AWS IoT Core service. 

![security](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojpjdo4q5cz6li1zbml9.png)
__What are AWS IoT Policies?__ 

 AWS IoT Policies are used to define permissions for AWS IoT Things. Policies are attached to certificates, and they define what actions a device can perform. AWS IoT policies use an access control language (ACL) that allows you to specify the resources and operations that a device can access.  

###MQTT persistent sessions policy examples


```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "iot:Connect"
            ],
            "Resource": "*",
            "Condition": {
                "ForAllValues:StringEquals": {
                    "iot:ConnectAttributes": [
                        "PersistentConnect"
                    ]
                }
            }
        }   
    ]
}
```
[policy-example-source](https://docs.aws.amazon.com/iot/latest/developerguide/connect-policy.html)



![Rules](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpz3j884mo3wkt44z4h7.png)
__What are AWS IoT Rules?__

 AWS IoT Rules are used to process the messages that are sent by AWS IoT Things. Rules define what actions should be taken when a message is received. Rules can be used to route messages to other AWS services or to perform actions on the messages, such as transforming the message payload or sending an alert. 

![Topic](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnqq3tj3rma0tg04jm71.png)
__What are AWS IoT Topics?__ 

AWS IoT Topics are used to organize the messages that are sent between AWS IoT Things and the AWS IoT Core service. Topics are hierarchical and follow a topic namespace. AWS IoT Topics are used to publish and subscribe to messages between devices and AWS services. 

I hope you've enjoyed learning about these resources throughout this article. Before we move on to the next topic, I'd love to hear about your personal work experiences with AWS IoT Core. Even if you're only at the research stage, I'm eager to hear your thoughts! Here are some questions to consider when thinking about your future IoT projects or learning:

1. How can AWS IoT Things be organized for better management, and what benefits does this provide for IoT development? 

2. How do AWS IoT Rules help to process and manage messages sent by IoT devices, and what actions can be taken based on these rules? 

3. What is the role of AWS IoT Topics in organizing and managing messages between devices and AWS services, and how can they be used to enhance IoT solutions? 

I'm looking forward to hearing from all of you in the comments section below!