diff --git a/assets/monitoring/aws-template/README.md.hbs b/assets/monitoring/aws-template/README.md.hbs index c8539b9..975ac48 100644 --- a/assets/monitoring/aws-template/README.md.hbs +++ b/assets/monitoring/aws-template/README.md.hbs @@ -9,3 +9,24 @@ Monitoring setup for MCA generated by the MCA CLI tool * `npm run synth` Emits the synthesized CloudFormation template * `npm run diff` Compare deployed stack with current state * `npm run deploy` Deploy this stack to your default AWS account/region + +## Troubleshooting + +### CloudFormation: "Rate exceeded" + +Stacks are being deployed all at once by default. + +If some stacks contain too many resources for the deployment to succeed, deployment dependencies can be defined to reduce amount of requests sent to CloudFormation, e.g.: + +```js +import * as mca from "mca-monitoring"; + +const app = mca.createApp(); + +const stack = mca.setupMonitoringStack(app, "monitoring"); +const logGroupMonitoringStacks = stack.addDefaultLogGroupMonitoring(); + +logGroupMonitoringStacks.forEach(logGroupMonitoringStack => { + stack.addDefaultLambdaMonitoring().forEach(defaultStack => defaultStack.addDependency(logGroupMonitoringStack)); +}) +```