Skip to content

IoT Core

CloudMock emulates AWS IoT Core, supporting things, thing types, thing groups, policies, certificates, topic rules, and tagging.

OperationStatusNotes
CreateThingSupportedCreates a thing
DescribeThingSupportedReturns thing details
ListThingsSupportedLists all things
UpdateThingSupportedUpdates a thing
DeleteThingSupportedDeletes a thing
CreateThingTypeSupportedCreates a thing type
DescribeThingTypeSupportedReturns thing type details
ListThingTypesSupportedLists thing types
DeleteThingTypeSupportedDeletes a thing type
CreateThingGroupSupportedCreates a thing group
DescribeThingGroupSupportedReturns thing group details
ListThingGroupsSupportedLists thing groups
DeleteThingGroupSupportedDeletes a thing group
AddThingToThingGroupSupportedAdds a thing to a group
RemoveThingFromThingGroupSupportedRemoves a thing from a group
CreatePolicySupportedCreates an IoT policy
GetPolicySupportedReturns policy details
ListPoliciesSupportedLists policies
DeletePolicySupportedDeletes a policy
AttachPolicySupportedAttaches a policy to a target
DetachPolicySupportedDetaches a policy
ListAttachedPoliciesSupportedLists attached policies
CreateKeysAndCertificateSupportedCreates keys and certificate
DescribeCertificateSupportedReturns certificate details
ListCertificatesSupportedLists certificates
DeleteCertificateSupportedDeletes a certificate
AttachThingPrincipalSupportedAttaches a principal to a thing
DetachThingPrincipalSupportedDetaches a principal
ListThingPrincipalsSupportedLists thing principals
CreateTopicRuleSupportedCreates a topic rule
GetTopicRuleSupportedReturns topic rule details
ListTopicRulesSupportedLists topic rules
DeleteTopicRuleSupportedDeletes a topic rule
TagResourceSupportedAdds tags to a resource
UntagResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
import { IoTClient, CreateThingCommand } from '@aws-sdk/client-iot';
const client = new IoTClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
const { thingName, thingArn } = await client.send(new CreateThingCommand({
thingName: 'my-sensor',
}));
console.log(thingArn);
import boto3
client = boto3.client('iot',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
response = client.create_thing(thingName='my-sensor')
print(response['thingArn'])
cloudmock.yml
services:
iot:
enabled: true
  • Certificates are stubs and cannot be used for real MQTT connections
  • Topic rules are stored but do not trigger actions
  • MQTT message broker is not implemented