Examples

Send and Receive Topics

The default Thing in AWS IoT Core offers example topics – e.g. topic_1. All these configurations can be found under AWS IoT/Security/Policies:
mqtt aws broker wccoa thing
Configure an _address Config in WinCC OA :
  • Configure an _address config as shown below.
mqtt aws broker address config

AWS MQTT Test Client

  • In AWS IoT Core you can use a test client to publish and subscribe topics:
    mqtt aws broker mqtt test client
  • When entering data in WinCC OA and clicking Apply, you can also see this value via the test client:
    mqtt aws broker mqtt test client value

Add a custom Topic to the Policy

  • Go to Security/Policies and select your Thing's policy. Then click Edit active version to edit the policy. For the Policy documentation - see : https://docs.aws.amazon.com/iot/latest/developerguide/iot-policy-actions.html?icmpid=docs_iot_hp_secure:
    mqtt aws broker mqtt edit active version
  • Switch to the JSON view and add a new entry as in the figure below:
    mqtt aws broker mqtt json view
  • To activate this policy, select Set the edited version as the active version for this policy and click Save as new version:
    mqtt aws broker mqtt save as version
  • Now update the topic name in WinCC OA:
    mqtt aws broker mqtt topic name para
  • and apply the _original value:
    mqtt aws broker mqtt orig value para
  • In the MQTT test client you can now also subscribe to the topic_own and see the published data (value):
    mqtt aws broker mqtt test client new value