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

feat(aws-iot): topic rules and actions #13581

Closed
wants to merge 35 commits into from

Conversation

hollanddd
Copy link
Contributor

@hollanddd hollanddd commented Mar 14, 2021

Adds construct for IoT Topic Rule and introduces @aws-iot/aws-iot-actions.

The supported Actions are Lambda, SNS, RepublishTopic & SQS.

This is a bit better and needs review when time permits:
TopiRule.grantPublish accepts ITopicRule and the topic string to publish to an MQTT topic. IoT topics are maintained by the system designer and do not contain a CfnTopic construct backing.

Closes #5420


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Mar 14, 2021

@github-actions github-actions bot added the @aws-cdk/aws-iot Related to AWS IoT label Mar 14, 2021
remove error action property

constructor(scope: Construct, id: string, props: TopicRuleProps) {
super(scope, id, {
physicalName: props.ruleName || 'TODO',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to ruleName when it's property is optional


public bind(rule: iot.ITopicRule): iot.TopicRuleActionConfig {
// Allow rule to publish to topic
const role = this.props.role || singletonTopicRuleRole(rule, [new iam.PolicyStatement({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrowed from aws-event-target and have clear gaps in understanding or the role mechanism in this case.

hollanddd and others added 23 commits March 13, 2021 18:56
include `aws-iot-actions`
add integration tests and remove circular dependency caused by
ensure. The integrations show that two iam roles are generated.

I'm not sure of the best course of action
add `aws-iot-actions` as dependency
fix description and add SQL version enum
add updated integrations
…s#13598)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Satisfies aws#13497 to close aws#13403

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
aws#13624)

This [PR](aws#13488) upgraded our Node runtimes from `10` to `14`. The problem is that Node14 isn't supported for lambda functions using inline code (i.e `ZipFile`). 

Change to Node12 specifically for the notification handler since it's the only one using `InlineLambda`. 

Fixes aws#13620

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The build script was assuming everything in the package directory
was itself a directory; not necessarily true on macOS machines.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I've received feedback from some folks who would like to start
contributing to the CDK but found the contribution guide unwieldy.

Attempting to wittle down and simplify. Move content around so that
useful information is at the top.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ws#12507)

Fixes aws#12099 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The previous attempt at a fix missed one important case: the types
of the values involved in the `{ Fn::Join }` expression didn't actually
match up. They all needed to be strings, but the previous implentation
just dropped list-typed values in there.

Unfortunately, there is no way to do it correctly with just string
manipulation in CloudFormation (`{ Fn::Join }` etc), so we'll have
to resort to using a Custom Resource if we encounter list values.

Actually fixes aws#13465.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This is an attempt to make the documentation safer to parse and render.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
SoManyHs and others added 9 commits March 17, 2021 10:40
Closes aws#13583


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adds optional `policyDocument` prop to `TopicPolicyProps` to allow passing existing policy documents.

fixes aws#7934

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Co-authored-by: AWS CDK Team <aws-cdk@amazon.com>
Allows setting an authorizer and authorization scopes that will be applied to all routes of the api.

@nija-at this is the bit we forgot In the first PR.

----

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

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 51afe94
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@skinny85 skinny85 added p2 review/large effort/large Large work item – several weeks of effort labels Mar 18, 2021
@skinny85
Copy link
Contributor

Thanks for the contribution @hollanddd! We have reviewed this pull request and marking it as p2, which means that we are unable to work on it immediately. We especially value community contributed code, so this is not a final decision.
We use +1s to help prioritize our work, and are happy to revaluate this pull request based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

@skinny85 skinny85 removed their assignment Apr 16, 2021
@rix0rrr rix0rrr added feature-request A feature should be added or improved. p1 and removed p2 effort/large Large work item – several weeks of effort @aws-cdk/aws-iot Related to AWS IoT labels Mar 4, 2022
@TheRealAmazonKendra
Copy link
Contributor

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support lambda actions for IoT topic rules