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

(CLI): hotswap support for CloudWatch Dashboards #20051

Open
2 tasks
jonnekaunisto opened this issue Apr 23, 2022 · 5 comments
Open
2 tasks

(CLI): hotswap support for CloudWatch Dashboards #20051

jonnekaunisto opened this issue Apr 23, 2022 · 5 comments
Labels
effort/medium Medium work item – several days of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. hotswap p2 package/tools Related to AWS CDK Tools or CLI

Comments

@jonnekaunisto
Copy link
Contributor

Describe the feature

I'd like CDK to support hotswapping the CloudWatch dashboard resource: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html

Use Case

When editing dashboard in CDK, I will often make small changes and view them in the console, since its not very apparent from CDK if the setup is correct(similarly to SFN). Hotswap feature would greatly increase the iteration speed, which for our team has been one of the major painpoints of using CDK for dashboards.

Proposed Solution

Call the PutDashboard API: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutDashboard.html

Other Information

No response

Acknowledgements

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

CDK version used

N/A

Environment details (OS name and version, etc.)

N/A

@jonnekaunisto jonnekaunisto added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Apr 23, 2022
@skinny85 skinny85 added p2 effort/medium Medium work item – several days of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs and removed needs-triage This issue or PR still needs to be triaged. labels Apr 25, 2022
@skinny85
Copy link
Contributor

Thanks for opening the issue @jonnekaunisto!

Do you know if there's an API in CloudWatch that allows updating the dashboard?

@jonnekaunisto
Copy link
Contributor Author

jonnekaunisto commented Apr 25, 2022

Yup the PutDashboard API: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutDashboard.html

But it will also create a dashboard if the dashboard doesn't exist, so during hotswap deployments we probably need to check if the dashboard exists and fail if it doesn't.

@skinny85
Copy link
Contributor

Thanks! I don't think that behavior will be a problem - we only do hotswap for resource updates, not creates, so I don't think there's any need to check for that.

@straygar
Copy link

Heya! I'm interested in implementing this, are there other hot-swap PRs I can look at for inspiration?

@skinny85
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. hotswap p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants