-
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
(@aws-cdk/aws-iot): New Rule does not call Action #12772
Comments
Just ran into this again today. Do you guys need any more info? |
Hello @denxorz , do you feel like this is a CDK-specific problem? Or is that just a problem with how the IoT service works? Thanks, |
Hello @skinny85 , Running the CDK example above results in a correct configuration in the Console, but it does not work. So definitely a bug. If needed we could do a video call or something so I can show you the issue. Best regards, |
Right. I'm just wondering whether it's a CDK bug, or a CloudFormation/IoT bug 🙂. Is the CloudFormation template the CDK generates correct with regards to the documentation for IoT? |
I am not sure. I did not use CloudFormation explicitly up till this point, so I did not learn to read those templates yet (that's the advantage of CDK). Is there anything specific you are looking for in the template? It might not be very explicit in my first post, but if you use a name of a rule that already existed, then it works through CDK. I am not sure where something like the name could be "cached", but it might help you determine if that is in CDK of CloudFormation. |
So, from looking at https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.html , the example they use uses an existing Rule (its name is passed through a CloudFormation Parameter). When talking about creating Rules: https://docs.aws.amazon.com/iot/latest/developerguide/iot-create-rule.html , it only mentions creating them through the API, not through CloudFormation. Perhaps this is a known limitation of IoT's CloudFormation support? Do you have AWS premium support by chance - perhaps you can open a ticket to clarify? Basically, I think there's not much we can do here from the CDK side - everything seems to be working normally from the CDK perspective, it's the actual service's behavior (or its CloudFormation support) that's acting up. Unfortunately, there's not much we can do if that's the case 😕. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I did try to open a ticket at premium support, but it seems our businees contract expired 2 weeks ago. I am looking into this, but currently I am unable to at a ticket over there. As a developer I understand that you cant just change your code base to fix this, if this is not part of your product. But as a user of the CDK I am also unable to use the CDK reliably (sometimes it works, some times it does not). And as reliability is one of the aspects of using infrastructure as code, this might be a thing that you could pick up with your collegues as well @skinny85 . |
Running into the very same issue, there is definitely a bug @skinny85. Will try to identify if it is more a CDK or cloudformation bug. In the meantime, here are some JS code:
This code above creates all the resources: the lambda function and the rule but no data is transferred to the lambda function. When going in the AWS console, editing the rule and just clicking on the "update" button without doing any modifications is enough to then have the rule working and the data starting flooding to the lambda function |
Can confirm it is a Cloudformation bug |
Found the reason for this issue, you need to setup a
Because it fails silently without this permission, and it is quite impossible for someone to tell what's missing, I would suggest that CDK automatically creates this resource (as its main goal and philosophy is to come with sensible default) |
When I add a new IoT Rule+Action through CDK, the Action is not used until I make changes through the Console.
Reproduction Steps
As a workaround you can make it work by adding a "Error action" through Console and remove it again.
5. Go to the Console, and add a CloudWatch log action to the "Error action"
6. Remove the CloudWatch log action
7. Repeat step 3 and 4, now you will see output in step 4.
What did you expect to happen?
I expect the Lambda to be called.
What actually happened?
Nothing?
Environment
Other
Region: eu-west-1.
Using the CDK since version 1.73.0, and I think it was already an issue in that version, at least it is not new in 1.86.0.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: