Skip to content
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): L2 support for TopicRule #16602

Closed
1 of 2 tasks
yamatatsu opened this issue Sep 22, 2021 · 2 comments · Fixed by #16681
Closed
1 of 2 tasks

(iot): L2 support for TopicRule #16602

yamatatsu opened this issue Sep 22, 2021 · 2 comments · Fixed by #16681
Labels
@aws-cdk/aws-iot Related to AWS IoT effort/large Large work item – several weeks of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1

Comments

@yamatatsu
Copy link
Contributor

Currently there's only L1 resources in CfnTopicRule of aws-iot.
Let's create L2 construct support.

Use Case

It is to use AWS IoT Rule.

Proposed Solution

There is pseudocode as following:

const topicRule = new TopicRule(stack, 'MyTopicRule', {
  topicRulePayload: {
    sql: "SELECT topic(2) as device_id, temperature FROM 'device/+/data'",
  },
});
topicRule.addAction(new HttpAction('http://example.com'));
topicRule.addAction(new CloudwatchLogsAction());
topicRule.addAction(new RepublishAction('republished-topic'));

Other

Associate with #6835

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@yamatatsu yamatatsu added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 22, 2021
@github-actions github-actions bot added the @aws-cdk/aws-iot Related to AWS IoT label Sep 22, 2021
@yamatatsu
Copy link
Contributor Author

@skinny85
I created a draft PR for aws-iot L2 constructs. #16681
This includes following:

  • L2 Construct TopicRule
  • L2 Construct RepublishAction
  • and tests

And this doesn't have following yet:

  • comments
  • other actions

If there are no problems, I will continue with the rest of the implementation.

@skinny85 skinny85 added effort/large Large work item – several weeks of effort in-progress This issue is being actively worked on. p1 feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs and removed needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2021
@skinny85 skinny85 removed their assignment Oct 19, 2021
@mergify mergify bot closed this as completed in #16681 Oct 21, 2021
mergify bot pushed a commit that referenced this issue Oct 21, 2021
I tried to implement aws-iot L2 Constructs.

I did following:

1. add L2 construct
1. add unit tests
1. add integration test
1. test with deploying to my AWS account and sending MQTT.
1. update package.json

resolves: #16602

I should do following for undrafting:

- [x] write comments
- [x] implement other actions
  Following is not implemented yet, but I will implements other PR.
  - Elasticsearch
  - Kinesis Firehose
  - Kinesis Stream
  - http
  - IoT Analytics
  - IoT Events
  - IoT SiteWise
  - kafka
  - Step Functions
- [x] write README

----

## Design

### TopicRule and IAction

![image](https://user-images.githubusercontent.com/11013683/136200920-9aa1aa58-2e9f-4a0d-a161-bbe251d02f7d.png)

### Implements of IAction

![image](https://user-images.githubusercontent.com/11013683/136201053-4f693683-3318-4fbf-9a7e-cd3f8ac1a93e.png)



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
I tried to implement aws-iot L2 Constructs.

I did following:

1. add L2 construct
1. add unit tests
1. add integration test
1. test with deploying to my AWS account and sending MQTT.
1. update package.json

resolves: aws#16602

I should do following for undrafting:

- [x] write comments
- [x] implement other actions
  Following is not implemented yet, but I will implements other PR.
  - Elasticsearch
  - Kinesis Firehose
  - Kinesis Stream
  - http
  - IoT Analytics
  - IoT Events
  - IoT SiteWise
  - kafka
  - Step Functions
- [x] write README

----

## Design

### TopicRule and IAction

![image](https://user-images.githubusercontent.com/11013683/136200920-9aa1aa58-2e9f-4a0d-a161-bbe251d02f7d.png)

### Implements of IAction

![image](https://user-images.githubusercontent.com/11013683/136201053-4f693683-3318-4fbf-9a7e-cd3f8ac1a93e.png)



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-iot Related to AWS IoT effort/large Large work item – several weeks of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants