Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix(iot): policies
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jul 23, 2019
1 parent 0025bf7 commit 0f75122
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions cdk/stacks/Bifravst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ export class BifravstStack extends CloudFormation.Stack {
}),
],
}),
iot: new IAM.PolicyDocument({
statements: [
new IAM.PolicyStatement({
actions: [
'iot:Receive',
'iot:UpdateThingShadow',
'iot:GetThingShadow',
'iot:Subscribe',
],
resources: ['*'],
}),
new IAM.PolicyStatement({
actions: ['iot:Connect'],
resources: ['arn:aws:iot:*:*:client/user-*'],
}),
],
}),
},
})

Expand Down Expand Up @@ -154,11 +171,15 @@ export class BifravstStack extends CloudFormation.Stack {
{
Effect: 'Allow',
Action: ['iot:Connect'],
Resource: ['*'],
Resource: ['arn:aws:iot:*:*:client/user-*'],
},
{
Effect: 'Allow',
Action: ['iot:Receive'],
Action: [
'iot:Receive',
'iot:UpdateThingShadow',
'iot:GetThingShadow',
],
Resource: ['*'],
},
{
Expand Down

0 comments on commit 0f75122

Please sign in to comment.