-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(iot): TopicRule action for Step Functions in AWS IoT #17698
Comments
any update on this issue? Has the feature been implemented in v2? |
@sholtomaud Nope yet. But you can use escape-hatch as following: import * as iot from '@aws-cdk/aws-iot-alpha';
const stateMachine = new new sfn.StateMachine(this, 'StateMachine', {
definition,
});
const role = new iam.Role(this, 'MyRole', {
assumedBy: new iam.ServicePrincipal('iot.amazonaws.com'),
});
stateMachine.grantStartExecution(role);
new iot.TopicRule(this, 'TopicRule', {
sql: iot.IotSql.fromStringAsVer20151008("SELECT topic(2) as device_id FROM 'device/+/data'"),
actions: [
{
bind: () => ({
configuration: {
stepFunctions: {
stateMachineName: stateMachine.stateMachineName,
executionNamePrefix: "myExecution", // optional
roleArn: role.roleArn,
}
},
}),
},
],
}); This example needs to install |
Ok, looks interesting. |
Is there a dirty fix when using python? |
Add new IoT topic rule action to send IoT messages to Step Functions State Machines. Closes #17698. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Description
The CDK has no support to trigger Step Functions via AWS IoT Rule.
Use Case
Adding the action that triggers Step Functions to AWS IoT topic rule.
Proposed Solution
Implementing action class.
Probably, following PRs help coding.
Other information
Follofing documentation will be help.
It will be good first issue for learning implement feature in CDK!
Acknowledge
The text was updated successfully, but these errors were encountered: