Policy
Source:
src/AWS/IoT/Policy.ts
An AWS IoT policy that grants MQTT permissions (connect, publish, subscribe, receive) to certificates and other principals.
Creating a Policy
Section titled “Creating a Policy”const policy = yield* Policy("device-policy", { policyDocument: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Action: "iot:Connect", Resource: "*" }, { Effect: "Allow", Action: ["iot:Publish", "iot:Receive"], Resource: "*" }, ], },});