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: configure AWS IoT logging #31357

Closed
1 of 2 tasks
Labels
@aws-cdk/aws-iot Related to AWS IoT effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@badmintoncryer
Copy link
Contributor

badmintoncryer commented Sep 7, 2024

Describe the feature

To enable AWS IoT logging feature by AWS CDK.

new iot.Logging(this, 'Logging', {
  logLevel: iot.LogLevel.WARN,
})

Use Case

Cloudformation supports for configuring AWS IoT logging for all activities but AWS CDK doesn't support this.

To enable this feature, we have to setup logging role simultaneously. I believe it would be better to create the logging role implicitly using AWS CDK."

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.155.0

Environment details (OS name and version, etc.)

irrelevant

@badmintoncryer badmintoncryer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Sep 7, 2024
@github-actions github-actions bot added the @aws-cdk/aws-iot Related to AWS IoT label Sep 7, 2024
@badmintoncryer badmintoncryer changed the title iot: configure logging feature iot: configure AWS IoT logging Sep 8, 2024
@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 9, 2024
@pahud
Copy link
Contributor

pahud commented Sep 9, 2024

Thank you for the PR!

@mergify mergify bot closed this as completed in #31352 Sep 10, 2024
@mergify mergify bot closed this as completed in 6348717 Sep 10, 2024
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2024
xazhao pushed a commit to xazhao/aws-cdk that referenced this issue Sep 12, 2024
### Issue # (if applicable)

Closes aws#31357.

### Reason for this change

Cloudformation supports for configuring [AWS IoT logging](https://docs.aws.amazon.com/iot/latest/developerguide/configure-logging.html) but AWS CDK doesn't support it.

We have to create [logging role](https://docs.aws.amazon.com/iot/latest/developerguide/configure-logging.html#configure-logging-role-and-policy) to enable IoT logging. It is not particularly difficult, but it is user-friendly if IAM roles are implicitly generated by CDK simultaneously.

### Description of changes

- define `ILogging` interface
- define `LoggingProps`
- define `Logging` class
  - create `CfnLogging`
  - generate logging role

### Description of how you validated changes

Added both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*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 subscribe to this conversation on GitHub. Already have an account? Sign in.