Skip to Content
Asterrr's Handbook
Service cheat sheets

Internet of Things

AWS IoT Core device identity, fleet provisioning and Device Defender audit, detect and mitigation.

AWS IoT Core connects devices that prove their identity with X.509 certificates. IoT policies then decide what each certificate may do. AWS IoT Device Defender audits the fleet configuration and watches device behavior.

mTLSvalidatefleet dataalertmitigatelogsIoT deviceIoT CorePre-provisioninghookDevice DefenderSNS alertCloudWatch Logs
A device connects with a certificate over mutual TLS. Provisioning can call a Lambda hook. Device Defender raises alerts and can mitigate by acting on the certificate or thing groups.

Service table

ServiceWhat it isExam factSecurity controls
AWS IoT CoreDevice gateway, message broker, rules engine and registryDevices authenticate with X.509 client certificates. IoT policies authorize themX.509 certificate chains for server and client authentication, IoT policies, TLS 1.2 required, data encrypted at rest under AWS owned keys by default with a customer managed KMS key option, interface VPC endpoints, CloudWatch Logs, CloudTrail
AWS IoT Device DefenderFleet security service with Audit and DetectAudit checks configuration. Detect watches behavior against security profilesScheduled or on-demand audits, behavior alarms, mitigation actions with their own execution role

Fleet provisioning

Fleet provisioning gets unique certificates onto devices that ship without one. A provisioning template defines the things, certificates and policies to create.

MethodFlow
By claimDevice ships with a shared provisioning claim certificate and key. It connects, swaps them for a unique certificate by calling CreateKeysAndCertificate or CreateCertificateFromCsr, then calls RegisterThing and reconnects with the new certificate
By trusted userAn installer or end user signs in to an app. The app calls CreateProvisioningClaim and passes a temporary claim certificate, valid five minutes, to the device
  • The claim certificate's IoT policy should allow only the provisioning topics. Guard its private key and deactivate the certificate if you see misuse.
  • The ownership token from certificate creation expires after one hour. An unactivated, unattached certificate is deleted at expiry.
  • A pre-provisioning hook is a Lambda function that returns allowProvisioning to approve or reject a device and can override template parameters.
  • The provisioning role carries the AWSIoTThingsRegistration managed policy and trusts the IoT service.

Legacy

Some study notes describe just-in-time provisioning as a temporary certificate swapped for a permanent one. That swap is what fleet provisioning by claim does. Fleet provisioning has two options, claim and trusted user, with an optional pre-provisioning hook.

Device Defender

CapabilityWhat it does
AuditChecks account and fleet configuration. Examples are device certificates expiring, revoked certificates still active, certificates shared by devices and weak key quality
DetectCompares device behavior with a security profile and raises violations
Mitigation actionsAutomated responses tied to findings or violations. UPDATE_DEVICE_CERTIFICATE can only deactivate the certificate. ADD_THINGS_TO_THING_GROUP moves devices into a named group such as a quarantine group
  • Each mitigation action runs under an execution role. Certificate updates need iot:UpdateCertificate. Group changes need iot:ListPrincipalThings and iot:AddThingToThingGroup.
  • Device Defender does not roll mitigations back. Reactivating a certificate is manual.

Exam signal

"Compromised device keeps connecting" is deactivate its certificate, or quarantine it by moving it to a thing group whose policy denies everything. "Find certificates shared across devices" is a Device Defender audit check.

Exam trap

IAM policies do not authorize devices that connect with certificates. An IoT policy attached to the certificate does. IAM and Cognito credentials suit apps and AWS callers, not constrained devices.

Application integration covers SNS alerts. GuardDuty covers account-level threats that Device Defender does not.

Further reading

On this page