Free tool
IoT Core rule action role policy generator
Pick the services your IoT Core calls and get the rule action role it needs — scoped to the right ARNs, with the reason behind every action.
1. Which thing needs the role?
The compute that makes the calls. It assumes the role; everything else is a resource the role points at.
Changing this opens that principal’s own page.
2. What does it call?
Only connections the knowledge base records IAM requirements for. Tick what your IoT Core actually talks to.
3. Fill in your account (optional)
Leave these blank and the ARNs keep visible placeholders, so a half-finished policy fails instead of quietly granting more than you meant.
Your role
Nothing selected yet, so the role below can be assumed but grants nothing. Tick a service above.
{
"Version": "2012-10-17",
"Statement": []
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "IoTCoreAssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "iot.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Before you apply this
- These are the actions this integration typically needs — not a least-privilege proof. After you deploy, narrow the policy with IAM Access Analyzer, which generates one from the calls the principal actually made.
- No permissions were generated. The role below can be assumed but grants nothing — pick at least one service this principal calls.
Worth knowing about a IoT Core rule action role
- This role is assumed by an IoT topic rule to run its action. Each rule action names the role it uses, so a rule fanning out to several targets can share one role or use one per action.
- The trust policy lets any iot.amazonaws.com resource in any account assume this role. AWS recommends narrowing it with an aws:SourceArn (and aws:SourceAccount) condition naming the specific resource that may assume it — add that once you know the ARN.
Grounded in the same data that validates diagrams
Design Beaver models AWS connections so it can tell you when a diagram is wrong. Part of that model is which IAM actions each integration needs and why — researched against AWS documentation, not inferred. This tool reads that data directly, which is why it can explain every statement instead of just emitting one.
It also means the tool knows what it doesn’t know. A connection the knowledge base has no IAM data for is skipped and named, never filled in with a plausible guess. Where an action comes from somewhere other than the knowledge base, it is labelled.
What a IoT Core rule action role can be scoped to
IoT Core assumes this role through the iot.amazonaws.com service principal. These are the 6 connections the knowledge base records IAM requirements for:
- IoT Core → DynamoDB
A topic rule's DynamoDB action writes the (optionally transformed) device message straight into a table — e.g. persisting each sensor reading as an item, keyed by device ID and timestamp
dynamodb:PutItemThe rule's IAM role must grant dynamodb:PutItem on the target table
- IoT Core → Lambda
A topic rule's Lambda action invokes a function with the matched device message as input — the general-purpose way to run custom logic on incoming device data
lambda:InvokeFunctionThe rule's IAM role (the role IoT Core assumes to run the action) must grant lambda:InvokeFunction on the target function
- IoT Core → S3
A topic rule's S3 action saves the message payload as an object — e.g. archiving raw device data to a bucket for later batch processing or as a data lake landing zone
s3:PutObjectThe rule's IAM role must grant s3:PutObject on the target bucket/prefix
- IoT Core → SNS
A topic rule's SNS action publishes to a topic to fan a device event out to multiple subscribers or send a push/SMS notification — e.g. alerting when a sensor crosses a threshold
sns:PublishThe rule's IAM role must grant sns:Publish on the target topic
- IoT Core → SQS
A topic rule's SQS action sends the message to a queue, giving a downstream consumer a durable buffer to process device data at its own pace
sqs:SendMessageThe rule's IAM role must grant sqs:SendMessage on the target queue
- IoT Core → Step Functions
A topic rule's Step Functions action starts a state machine execution from a device message — kicking off a multi-step workflow (e.g. an over-the-air update or an incident-response flow) in response to a device event
states:StartExecutionThe rule's IAM role must grant states:StartExecution on the target state machine
Generate a role for something else
- EC2instance profile roleDynamoDB · EventBridge · Lambda · S3 · Secrets Manager · SES · SNS · SQS
- Lambdaexecution roleDynamoDB · EventBridge · S3 · Secrets Manager · SES · SNS · SQS
- Step Functionsstate machine execution roleDynamoDB · EventBridge · Lambda · S3 · SNS · SQS
- CodeBuildservice roleCodeArtifact · CodeCommit · ECR · S3 · Secrets Manager
- ECStask roleDynamoDB · S3 · Secrets Manager · SNS · SQS
- App Runnerinstance roleDynamoDB · S3 · Secrets Manager
- API Gatewayintegration roleDynamoDB · Step Functions
Questions
Where do the actions come from?
Is this a least-privilege policy?
How is this different from the other IAM policy generators?
Does anything I type leave my browser?
Why are there two policies?
Draw it instead, and the role attaches itself
Design Beaver knows which connections need a role because it checks them as you draw. Drop an IAM Role node onto a function and the warnings it resolves disappear. Free, in your browser — sign in with Google or GitHub to save your work.
Sign up for free! →Prefer email? Get new features in your inbox: