AWS IoT Core
Connect Delphi/C++Builder applications to AWS IoT Core over MQTT. Mutual TLS with X.509 certificates or SigV4-signed WebSocket, plus shadow and rule-engine integration.
Connect Delphi/C++Builder applications to AWS IoT Core over MQTT. Mutual TLS with X.509 certificates or SigV4-signed WebSocket, plus shadow and rule-engine integration.
AWS IoT Core MQTT 3.1.1 / MQTT 5 client — X.509 mutual TLS or SigV4-over-WebSocket auth, plus subscriptions, retained messages, will, and the AWS-specific client-id constraints.
TsgcIoTAmazon_MQTT_Client
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
Set the AWS endpoint host, point the component at your X.509 cert/key (or supply AWS access keys for SigV4), then connect, subscribe and publish like any MQTT client.
uses
sgcIoT;
var
AWSIoT: TsgcIoTAmazon_MQTT_Client;
begin
AWSIoT := TsgcIoTAmazon_MQTT_Client.Create(nil);
AWSIoT.IoT.Host := 'a1b2c3d4e5f.iot.eu-west-1.amazonaws.com';
// X.509 mutual TLS
AWSIoT.IoT.Authentication := iotAuth_Certificate;
AWSIoT.IoT.Certificate.CertFile := 'device.cert.pem';
AWSIoT.IoT.Certificate.KeyFile := 'device.private.key';
AWSIoT.IoT.Certificate.RootCert := 'AmazonRootCA1.pem';
AWSIoT.OnMQTTConnect := procedure(Connection: TsgcWSConnection;
const Session: Boolean; const ReasonCode: Integer;
const ReasonName: string;
const ConnectProperties: TsgcWSMQTTCONNACKProperties)
begin
AWSIoT.Subscribe('devices/#');
end;
AWSIoT.Active := True;
AWSIoT.Publish('devices/sensor1/telemetry', '{"temp":22.5}');
end;
// uses: sgcIoT
TsgcIoTAmazon_MQTT_Client *AWSIoT = new TsgcIoTAmazon_MQTT_Client(this);
AWSIoT->IoT->Host = "a1b2c3d4e5f.iot.eu-west-1.amazonaws.com";
AWSIoT->IoT->Authentication = iotAuth_Certificate;
AWSIoT->IoT->Certificate->CertFile = "device.cert.pem";
AWSIoT->IoT->Certificate->KeyFile = "device.private.key";
AWSIoT->Active = true;
A pre-configured MQTT client for AWS IoT Core that handles the AWS-specific auth choices and topic conventions.
Set IoT.Authentication := iotAuth_Certificate and load the device certificate, private key and AmazonRootCA1.pem — the component uses ALPN x-amzn-mqtt-ca on port 443 if needed.
For browser-style auth set IoT.Authentication := iotAuth_AccessKey and configure access-key / secret-key / region — the component computes the SigV4 query-string presigned URL.
Toggle MQTTVersion; AWS IoT Core supports both. MQTT 5 properties (session expiry, topic alias, user properties) flow through the standard MQTT events.
AWS reserves topics under $aws/things/<thingName>/... for shadow, jobs and provisioning. Subscribe to them like any other topic to receive shadow updates and job assignments.
Bind WatchDog on the underlying client — on disconnect the component re-authenticates (fresh SigV4 query-string when applicable) and re-subscribes.
AWS IoT enforces per-connection limits (publish QoS, throughput, message size). Use a TsgcWSRateLimiter on the publish side to stay under the quota.
Authoritative sources for the protocol this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcIoTAmazon_MQTT_Client Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\10.IoT_Clients Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |