Skip to content

Instantly share code, notes, and snippets.

@mcavalcantib
Created September 19, 2019 00:17
Show Gist options
  • Select an option

  • Save mcavalcantib/6861358e5dbd15fc4589fd8473171ae9 to your computer and use it in GitHub Desktop.

Select an option

Save mcavalcantib/6861358e5dbd15fc4589fd8473171ae9 to your computer and use it in GitHub Desktop.
Example of how to setup a Amazon Web Services Iot Core policy to allow only two topics (inTopic and outTopic)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iot:Publish",
"iot:Connect",
"iot:Subscribe",
"iot:Receive"
],
"Resource": "arn:aws:iot:wwwwwwwww:xxxxxxxxxxxx:topic/outTopic"
},
{
"Effect": "Allow",
"Action": [
"iot:Publish",
"iot:Connect",
"iot:Subscribe",
"iot:Receive"
],
"Resource": "arn:aws:iot:wwwwwwwww:xxxxxxxxxxxx:topic/inTopic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment